Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.4.0-b1
-
Component/s: None
-
Labels:None
Description
See https://www.blesta.com/forums/index.php?/topic/11884-blesta-error-reportingdebug-breaks-blesta/
The following error can be encountered when attempting to use the Universal Module to add a new product on php 7.2:
count(): Parameter must be an array or an object that implements Countable on line 45 in /components/modules/universal_module/views/default/add_row.pdt
The fix is to update that add_row template (and the edit_row template) to ensura the argument is countable:
$num_package_fields = count($this->Html->ifSet($vars->package_fields['label']));
becomes
$num_package_fields = count($this->Html->ifSet($vars->package_fields['label'], []));