Skip to content

Commit 0ba7a4e

Browse files
committed
Fix PHP 8.4 pg_escape_string() deprecation in ez_pgsql
PHP 8.4 deprecated calling pg_escape_string() without explicitly passing the connection resource as the first argument. This updates ez_pgsql::escape() to pass $this->dbh, consistent with how ez_mysqli::escape() already passes its connection handle to mysqli_real_escape_string(). See #226
1 parent e98292e commit 0ba7a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Database/ez_pgsql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function connect(
122122
*/
123123
public function escape(string $str)
124124
{
125-
return \pg_escape_string(\stripslashes($str));
125+
return \pg_escape_string($this->dbh, \stripslashes($str));
126126
} // escape
127127

128128
/**

0 commit comments

Comments
 (0)