[php 7.2] fixed count(NULL) error - cast to array

This commit is contained in:
Ulf Gebhardt 2019-08-20 15:48:33 +02:00
parent f0aa42de92
commit 895eeb8bba
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -103,7 +103,7 @@ class State {
* @return bool Returns true or false.
*/
private static function is_loaded($row,&$substate,$state_name,$parent_id = -1){
for($i=0;$i<count($substate);$i++){
for($i=0;$i<count((array)$substate);$i++){
if($row['name'] == $state_name){
$substate[$i]['parent_id'] = $row['id'];}
if($substate[$i]['name'] == $row['name']){