Skip to content

Commit

Permalink
Fixed php 7.2 count() compatibility continued.
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-hunt committed Nov 29, 2018
1 parent ad05046 commit f9dd78a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/ui/contacts_view.inc
Expand Up @@ -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) {

This comment has been minimized.

Copy link
@boxygen

boxygen Dec 16, 2018

This commit is not working now after count_array() returning 1. Not giving any error nor adding the new contact.

display_error(_("You have to select at least one category."));
set_focus('assgn');
return false;
Expand Down
2 changes: 1 addition & 1 deletion includes/ui/items_cart.inc
Expand Up @@ -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)
Expand Down

0 comments on commit f9dd78a

Please sign in to comment.