From b15dff3f24c1c975a874dc2cd3afaaf8f2c93573 Mon Sep 17 00:00:00 2001 From: Mark Newnham Date: Fri, 3 Apr 2026 12:05:46 -0600 Subject: Intercepts null value passed to PDO qstr method --- drivers/adodb-pdo.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- cgit v1.3 From 4fba79d165cebf87fc38acdf99b601a2b7a82128 Mon Sep 17 00:00:00 2001 From: Mark Newnham Date: Fri, 3 Apr 2026 12:06:54 -0600 Subject: Intercepts null value passed to core AddQ method --- adodb.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"), -- cgit v1.3