FIX remove db object for avoid error with postgresql

This commit is contained in:
Regis Houssin 2022-10-07 08:54:13 +02:00
parent dc898fbc19
commit 4bb4d2dc64
2 changed files with 7 additions and 1 deletions

View File

@ -77,6 +77,11 @@ $prodattrval = new ProductAttributeValue($db);
$res = $prodattrval->fetchAllByProductAttribute($id);
// Remove db for avoid error with postgresql
foreach ($res as $key => $val) {
unset($res[$key]->db);
}
if ($res == -1) {
print json_encode(array(
'error' => 'Internal error'

View File

@ -477,8 +477,9 @@ if (!empty($id) || !empty($ref)) {
foreach ($prodattr_all as $each) {
$prodattr_alljson[$each->id] = $each;
// Remove db for avoid error with postgresql
unset($prodattr_alljson[$each->id]->db);
}
?>
<script type="text/javascript">