From 30504fcefbc0c2442ba63a8ced905e722b9eae42 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Sat, 22 Nov 2025 12:19:55 +0100 Subject: Fix static analysis warnings --- adodb-active-record.inc.php | 7 ++++--- adodb-active-recordx.inc.php | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/adodb-active-record.inc.php b/adodb-active-record.inc.php index 398abd3d..001d46d9 100644 --- a/adodb-active-record.inc.php +++ b/adodb-active-record.inc.php @@ -717,14 +717,16 @@ class ADODB_Active_Record { } // quote data in where clause - function doQuote(&$db, $val, $t) + function doQuote($db, $val, $t) { switch ($t) { + /** @noinspection PhpMissingBreakStatementInspection */ case 'L': if (strpos($db->databaseType, 'postgres') !== false) { return $db->qstr($val); } case 'D': + /** @noinspection PhpMissingBreakStatementInspection */ case 'T': if (empty($val)) { return 'null'; @@ -732,6 +734,7 @@ class ADODB_Active_Record { case 'B': case 'N': case 'C': + /** @noinspection PhpMissingBreakStatementInspection */ case 'X': if (is_null($val)) { return 'null'; @@ -743,11 +746,9 @@ class ADODB_Active_Record { (strncmp($val, "'", 1) != 0 || substr($val, strlen($val) - 1, 1) != "'") ) { return $db->qstr($val); - break; } default: return $val; - break; } } diff --git a/adodb-active-recordx.inc.php b/adodb-active-recordx.inc.php index 9daa05ec..079352f1 100644 --- a/adodb-active-recordx.inc.php +++ b/adodb-active-recordx.inc.php @@ -762,15 +762,17 @@ class ADODB_Active_Record { } // quote data in where clause - function doQuote(&$db, $val, $t) + function doQuote($db, $val, $t) { switch ($t) { case 'D': + /** @noinspection PhpMissingBreakStatementInspection */ case 'T': if (empty($val)) { return 'null'; } case 'C': + /** @noinspection PhpMissingBreakStatementInspection */ case 'X': if (is_null($val)) { return 'null'; @@ -782,11 +784,9 @@ class ADODB_Active_Record { (strncmp($val, "'", 1) != 0 || substr($val, strlen($val) - 1, 1) != "'") ) { return $db->qstr($val); - break; } default: return $val; - break; } } -- cgit v1.3