From f9dd78a24383c61eaed49836155d673cb2f913ca Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 29 Nov 2018 14:15:12 +0100 Subject: [PATCH] Fixed php 7.2 count() compatibility continued. --- includes/ui/contacts_view.inc | 2 +- includes/ui/items_cart.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/ui/contacts_view.inc b/includes/ui/contacts_view.inc index 8ad1496a4..fbc657611 100644 --- a/includes/ui/contacts_view.inc +++ b/includes/ui/contacts_view.inc @@ -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; diff --git a/includes/ui/items_cart.inc b/includes/ui/items_cart.inc index 96108f483..9d7781dee 100644 --- a/includes/ui/items_cart.inc +++ b/includes/ui/items_cart.inc @@ -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)