geodesicsolutions-community / geocore-community

GeoCore Community, open source classifieds and auctions software
MIT License
9 stars 6 forks source link

admin template count / array errors #231

Open iBeleave opened 8 months ago

iBeleave commented 8 months ago

Multiple type errors in php 8.1

Must be of type Countable|array: \admin\templates\site_map\category.tpl - {if count($category.children_pages) > 0} + {if $category.children_pages}

- {if count($category.children_categories) > 0} + {if $category.children_categories}

TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given \admin\templates\fields_to_use.tpl

~ 157 - {if !in_array('is_required',$field.skipData)} + {if !$field.skipData || !in_array('is_required',$field.skipData)}

~163 - {if !in_array('is_editable',$field.skipData)} + {if !$field.skipData || !in_array('is_editable',$field.skipData)}

~279 - {if $field.skipLocations === true || in_array($location, $field.skipLocations)} + {if $field.skipLocations === true || ($field.skipLocations && in_array($location, $field.skipLocations))} ~286 - {if in_array($location, $fields.$fieldName.display_locations)} + {if $fields.$fieldName.display_locations && in_array($location, $fields.$fieldName.display_locations)}