Merge pull request #8134 from hregis/6.0_multicompany

Fix: avoid error -1
This commit is contained in:
Laurent Destailleur 2018-02-05 15:13:31 +01:00 committed by GitHub
commit 2d4624a1be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1210,7 +1210,10 @@ abstract class CommonObject
if ($resql)
{
$row = $this->db->fetch_row($resql);
$result = $this->fetch($row[0]);
// Test for avoid error -1
if ($row[0] > 0) {
$result = $this->fetch($row[0]);
}
}
return $result;