Skip to content

Commit

Permalink
fix escape of pdo
Browse files Browse the repository at this point in the history
  • Loading branch information
hetao29 committed Nov 8, 2024
1 parent 4335c0f commit 4a7faed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/db/DbPDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public function rollback(){
}
public function escape($str){
if(!$this->_pdo)return false;
return trim($this->_pdo->quote($str),"'");
$str = $this->_pdo->quote($str);
return substr($str,1,strlen($str)-2);
}
public function lastId(){
if(!$this->_pdo)return false;
Expand Down

0 comments on commit 4a7faed

Please sign in to comment.