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:
@@ -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) {
|
||||
|
@@ -78,7 +78,7 @@ if (isset($_GET["sqlite"])) {
|
||||
);
|
||||
}
|
||||
|
||||
function __desctruct() {
|
||||
function __destruct() {
|
||||
return $this->result->finalize();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user