Fixed php 7.2 count() compatibility continued.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 29 Nov 2018 13:15:12 +0000 (14:15 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 29 Nov 2018 13:15:12 +0000 (14:15 +0100)
includes/ui/contacts_view.inc
includes/ui/items_cart.inc

index 8ad1496a439483dba84e7f3df20267265473cc1c..fbc657611131082198bb3b53cb7a4bdf33da11b0 100644 (file)
@@ -134,7 +134,7 @@ class contacts extends simple_crud {
                        set_focus('ref');
                        return false;
                }
-               if (count(@$_POST['assgn']) == 0) {
+               if (count_array(@$_POST['assgn']) == 0) {
                        display_error(_("You have to select at least one category."));
                        set_focus('assgn');
                        return false;
index 96108f483a346b3d6f0989243e734a5d08f59c7d..9d7781deec929f42ff7b730b24e2335b5373c165 100644 (file)
@@ -309,7 +309,7 @@ class items_cart
                if (!isset($tax_info['tax_reg']) && isset($tax_info['person_type']))
                        $tax_info['tax_reg'] = $tax_info['person_type']==PT_CUSTOMER ? TR_OUTPUT : TR_INPUT;
 
-               if (count(@$tax_info['net_amount']))    // guess exempt sales/purchase if any tax has been found
+               if (count_array(@$tax_info['net_amount']))      // guess exempt sales/purchase if any tax has been found
                {
                        $ex_net = abs($net_sum) - @array_sum($tax_info['net_amount']);
                        if ($ex_net != 0)