From 097fc3dc396072a9fe7c657c815106c8a32f9677 Mon Sep 17 00:00:00 2001 From: sroehrl Date: Thu, 13 Jun 2019 11:45:02 -0400 Subject: [PATCH] BUGFIX: escaping operandi/selectandi --- DbOps.php | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DbOps.php b/DbOps.php index 5bb74ea..9d48a4e 100644 --- a/DbOps.php +++ b/DbOps.php @@ -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 '<': @@ -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'; diff --git a/composer.json b/composer.json index d24f22f..20113ca 100644 --- a/composer.json +++ b/composer.json @@ -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",