Fix : Test pg_escape and pg_unescape exist before executing them

This commit is contained in:
Flokami
2022-04-18 22:51:16 +04:00
parent b18b9a960f
commit 8f215b2f6a
2 changed files with 9 additions and 2 deletions

View File

@@ -65,7 +65,9 @@ class YoutubeHelper
if ($file) {
$extra = serialize($extra);
if($this->dbconn->getDBType() == "pgsql"){
$extra = pg_escape_bytea($extra);
if (function_exists("pg_escape_bytea")) {
$extra = pg_escape_bytea($extra);
}
}
$data = [
'uid' => $this->user,