Use pg_version only if php>=5.0

This commit is contained in:
Sergey Dryabzhinsky 2025-06-11 15:36:14 +03:00
parent d04abab1b0
commit ad766871a5
2 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class KVStoragePgsql
public function version(){
if (!$this->available) return '-.-.-';
if (PHP_VERSION<'5.0') return '-.-.-';
$v=pg_version($this->conn);
if($v) return $v['server'];
}

View File

@ -36,6 +36,7 @@ function get_pgsql_version()
{
$c = get_pgsql_conn();
if ($c){
if (PHP_VERSION<'5.0')return '-.-.-';
$info = pg_version($c);
// print_r($info);
if (isset($info["server"]))