@@ -825,8 +825,7 @@ private static function getConditionValue(
825825 $ conditionValue = "= b' "
826826 . self ::printableBitValue ((int ) $ row , $ meta ->length ) . "' " ;
827827 } else {
828- $ conditionValue = '= \''
829- . $ GLOBALS ['dbi ' ]->escapeString ((string ) $ row ) . '\'' ;
828+ $ conditionValue = '= ' . $ GLOBALS ['dbi ' ]->quoteString ((string ) $ row );
830829 }
831830
832831 return [$ conditionValue , $ condition ];
@@ -1711,14 +1710,14 @@ public static function currentUserHasPrivilege(string $priv, string|null $db = n
17111710 return false ;
17121711 }
17131712
1714- $ query .= " AND '%s' LIKE `TABLE_SCHEMA` " ;
1713+ $ query .= ' AND %s LIKE `TABLE_SCHEMA` ' ;
17151714 $ schemaPrivileges = $ GLOBALS ['dbi ' ]->fetchValue (
17161715 sprintf (
17171716 $ query ,
17181717 'SCHEMA_PRIVILEGES ' ,
17191718 $ username ,
17201719 $ priv ,
1721- $ GLOBALS ['dbi ' ]->escapeString ($ db ),
1720+ $ GLOBALS ['dbi ' ]->quoteString ($ db ),
17221721 ),
17231722 );
17241723 if ($ schemaPrivileges ) {
@@ -1728,15 +1727,15 @@ public static function currentUserHasPrivilege(string $priv, string|null $db = n
17281727 // If a table name was also provided and we still didn't
17291728 // find any valid privileges, try table-wise privileges.
17301729 if ($ tbl !== null ) {
1731- $ query .= " AND TABLE_NAME=' %s' " ;
1730+ $ query .= ' AND TABLE_NAME=%s ' ;
17321731 $ tablePrivileges = $ GLOBALS ['dbi ' ]->fetchValue (
17331732 sprintf (
17341733 $ query ,
17351734 'TABLE_PRIVILEGES ' ,
17361735 $ username ,
17371736 $ priv ,
1738- $ GLOBALS ['dbi ' ]->escapeString ($ db ),
1739- $ GLOBALS ['dbi ' ]->escapeString ($ tbl ),
1737+ $ GLOBALS ['dbi ' ]->quoteString ($ db ),
1738+ $ GLOBALS ['dbi ' ]->quoteString ($ tbl ),
17401739 ),
17411740 );
17421741 if ($ tablePrivileges ) {
0 commit comments