1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 11:34:10 +02:00

Ensure PHP 5.3 compatibility

This commit is contained in:
Jakub Vrana
2025-03-11 21:43:59 +01:00
parent dc2e945aef
commit 2fdebfda29
6 changed files with 19 additions and 10 deletions

View File

@@ -43,7 +43,10 @@ if (isset($_GET["pgsql"])) {
}
function quote($string) {
return pg_escape_literal($this->link, $string);
return (function_exists('pg_escape_literal')
? pg_escape_literal($this->link, $string) // available since PHP 5.4.4
: "'" . pg_escape_string($this->link, $string) . "'"
);
}
function value($val, $field) {

View File

@@ -78,7 +78,7 @@ if (isset($_GET["sqlite"])) {
);
}
function __desctruct() {
function __destruct() {
return $this->result->finalize();
}
}