forked from Wavyzz/dolibarr
Optimized memory used by database handlers
This commit is contained in:
@@ -634,9 +634,9 @@ class DoliDb
|
||||
1451 => 'DB_ERROR_CHILD_EXISTS'
|
||||
);
|
||||
|
||||
if (isset($this->errorcode_map[$this->lasterrno]))
|
||||
if (isset($errorcode_map[$this->lasterrno]))
|
||||
{
|
||||
return $this->errorcode_map[$this->lasterrno];
|
||||
return $errorcode_map[$this->lasterrno];
|
||||
}
|
||||
$errno=$this->lasterrno;
|
||||
return ($errno?'DB_ERROR_'.$errno:'0');
|
||||
|
||||
@@ -615,9 +615,9 @@ class DoliDb
|
||||
1451 => 'DB_ERROR_CHILD_EXISTS'
|
||||
);
|
||||
|
||||
if (isset($this->errorcode_map[mysql_errno($this->db)]))
|
||||
if (isset($errorcode_map[mysql_errno($this->db)]))
|
||||
{
|
||||
return $this->errorcode_map[mysql_errno($this->db)];
|
||||
return $errorcode_map[mysql_errno($this->db)];
|
||||
}
|
||||
$errno=mysql_errno($this->db);
|
||||
return ($errno?'DB_ERROR_'.$errno:'0');
|
||||
|
||||
@@ -632,9 +632,9 @@ class DoliDb
|
||||
1451 => 'DB_ERROR_CHILD_EXISTS'
|
||||
);
|
||||
|
||||
if (isset($this->errorcode_map[mysqli_errno($this->db)]))
|
||||
if (isset($errorcode_map[mysqli_errno($this->db)]))
|
||||
{
|
||||
return $this->errorcode_map[mysqli_errno($this->db)];
|
||||
return $errorcode_map[mysqli_errno($this->db)];
|
||||
}
|
||||
$errno=mysqli_errno($this->db);
|
||||
return ($errno?'DB_ERROR_'.$errno:'0');
|
||||
|
||||
Reference in New Issue
Block a user