Update DoliDB.class.php

This commit is contained in:
Laurent Destailleur 2021-11-05 12:42:42 +01:00 committed by GitHub
parent dd8d4e9e98
commit 3959d12a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,17 +312,15 @@ abstract class DoliDB implements Database
*/
public function getRow($sql)
{
$sql .= ' LIMIT 1;';
$sql .= ' LIMIT 1';
$res = $this->query($sql);
if ($res)
{
if ($res) {
$obj = $this->fetch_object($res);
if(!$obj){
return 0;
}
else{
if ($obj) {
return $obj;
} else {
return 0;
}
}