From f810f2c8e4990dfbdeb219d39af7f668d12c3bdd Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Mon, 28 Sep 2020 09:13:15 +0200 Subject: [PATCH] Fix wrong expected type in viewcat.php --- htdocs/categories/viewcat.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 3a1d13d210e..b75b937c357 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -316,7 +316,7 @@ print ''; $cats = $object->get_filles(); if ($cats < 0) { - dol_print_error($db, $cats->error, $cats->errors); + dol_print_error($db, $object->error, $object->errors); } elseif (count($cats) < 1) { print ''; @@ -431,7 +431,7 @@ if ($type == Categorie::TYPE_PRODUCT) $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($prods < 0) { - dol_print_error($db, $prods->error, $prods->errors); + dol_print_error($db, $object->error, $object->errors); } else { // Form to add record into a category $showclassifyform = 1; @@ -510,7 +510,7 @@ if ($type == Categorie::TYPE_SUPPLIER) $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($socs < 0) { - dol_print_error($db, $socs->error, $socs->errors); + dol_print_error($db, $object->error, $object->errors); } else { print '
'; print ''; @@ -567,7 +567,7 @@ if ($type == Categorie::TYPE_CUSTOMER) $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($socs < 0) { - dol_print_error($db, $socs->error, $socs->errors); + dol_print_error($db, $object->error, $object->errors); } else { print ''; print ''; @@ -626,7 +626,7 @@ if ($type == Categorie::TYPE_MEMBER) $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($prods < 0) { - dol_print_error($db, $prods->error, $prods->errors); + dol_print_error($db, $object->error, $object->errors); } else { print ''; print ''; @@ -685,7 +685,7 @@ if ($type == Categorie::TYPE_CONTACT) $contacts = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($contacts < 0) { - dol_print_error($db, $contacts->error, $contacts->errors); + dol_print_error($db, $object->error, $object->errors); } else { print ''; print ''; @@ -747,7 +747,7 @@ if ($type == Categorie::TYPE_ACCOUNT) $accounts = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($accounts < 0) { - dol_print_error($db, $accounts->error, $accounts->errors); + dol_print_error($db, $object->error, $object->errors); } else { print ''; print '';