Skip to content

Commit

Permalink
BUGFIX: escaping operandi/selectandi
Browse files Browse the repository at this point in the history
  • Loading branch information
sroehrl committed Jun 13, 2019
1 parent ca542e9 commit 097fc3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DbOps.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function operandi($string, $set = false, $prepared = false) {
case '=':
// important! this is the first rule and needs to stay as such!
$return = ' = ? ';
$this->addExclusion($string);
$this->addExclusion(substr($string, 1));
break;
case '>':
case '<':
Expand Down Expand Up @@ -150,7 +150,7 @@ protected function selectandi($string) {
$rest = substr($string, 1);
switch($firstLetter) {
case '=':
$return = $this->addBackticks($string);
$return = $this->addBackticks(substr($string, 1));
break;
case '#':
$return = 'UNIX_TIMESTAMP(' . $this->_sanitizeAndAddBackticks($this->cleanAs($rest)) . ')*1000';
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "neoan3-apps/db",
"description": "neoan3 mysqli class",
"version": "0.1.3",
"version": "0.1.4",
"license": "MIT",
"require": {
"php": "^7.0",
Expand Down

0 comments on commit 097fc3d

Please sign in to comment.