diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 4e1a64cd20c..0acb4e0bedd 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -437,13 +437,15 @@ if ($result) { // Get thirdparty $tmppayment->fetch($links[$key]['url_id']); $arrayofamounts = $tmppayment->getAmountsArray(); - foreach ($arrayofamounts as $invoiceid => $amount) - { - $tmpinvoice->fetch($invoiceid); - $tmpinvoice->fetch_thirdparty(); - if ($tmpinvoice->thirdparty->code_compta) + if (is_array($arrayofamounts)) { + foreach ($arrayofamounts as $invoiceid => $amount) { - $tabtp[$obj->rowid][$tmpinvoice->thirdparty->code_compta] += $amount; + $tmpinvoice->fetch($invoiceid); + $tmpinvoice->fetch_thirdparty(); + if ($tmpinvoice->thirdparty->code_compta) + { + $tabtp[$obj->rowid][$tmpinvoice->thirdparty->code_compta] += $amount; + } } } } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index d3b918b9849..e9e6be408c8 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -719,7 +719,7 @@ if ($rowid > 0) { print '
| '.$langs->trans('Label').' | |
| '.$langs->trans('Label').' | |
| '.$langs->trans('Description').' | '; $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); @@ -264,7 +267,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) { print ' |
| '.$langs->trans('Language').' | '; print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs, 1); print ' |
| '.$langs->trans('Label').' | |
| '.$langs->trans('Label').' | |
| '.$langs->trans('Description').' | '; $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index e182a91d32a..03610100c9c 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -769,6 +769,7 @@ class Categories extends DolibarrApi $objects = $result; $cleaned_objects = array(); + $objects_api = null; if ($type == 'member') { $objects_api = new Members(); } elseif ($type == 'customer' || $type == 'supplier') { diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 3aca92708a7..f55b3403546 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1891,13 +1891,12 @@ class Categorie extends CommonObject return ""; } + $searchCategorySqlList = array(); foreach ($searchList as $searchCategory) { if (intval($searchCategory) == -2) { $searchCategorySqlList[] = " cp.fk_categorie IS NULL"; } elseif (intval($searchCategory) > 0) { - $searchCategorySqlList[] = " ".$rowIdName - ." IN (SELECT fk_".$type." FROM ".MAIN_DB_PREFIX."categorie_".$type - ." WHERE fk_categorie = ".$searchCategory.")"; + $searchCategorySqlList[] = " ".$rowIdName." IN (SELECT fk_".$type." FROM ".MAIN_DB_PREFIX."categorie_".$type." WHERE fk_categorie = ".((int) $searchCategory).")"; } } |