diff options
| -rw-r--r-- | adodb.inc.php | 6 | ||||
| -rw-r--r-- | drivers/adodb-pdo.inc.php | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/adodb.inc.php b/adodb.inc.php index 991ec791..2af0863a 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -3671,11 +3671,15 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1 * @param bool $magic_quotes This param is not used since 5.21.0. * It remains for backwards compatibility. * - * @return string Quoted string + * @return null|string Quoted string * * @noinspection PhpUnusedParameterInspection */ function addQ($s, $magic_quotes=false) { + + if (!$s) { + return $s; + } if ($this->replaceQuote[0] == '\\') { $s = str_replace( array('\\', "\0"), diff --git a/drivers/adodb-pdo.inc.php b/drivers/adodb-pdo.inc.php index f25006ba..9fd01d67 100644 --- a/drivers/adodb-pdo.inc.php +++ b/drivers/adodb-pdo.inc.php @@ -665,10 +665,13 @@ class ADODB_pdo extends ADOConnection { * @param bool $magic_quotes This param is not used since 5.21.0. * It remains for backwards compatibility. * - * @return string Quoted string + * @return null|string Quoted string */ function qStr($s, $magic_quotes = false) { + if (!$s) { + return $s; + } if ($this->_connectionID) { return $this->_connectionID->quote($s); } |
