Schlumpf / osmodul

OSModul has moved to Gitlab!
https://gitlab.com/schlumpf/osmodul
8 stars 3 forks source link

PHP 7.2 Warning : count(): Parameter must be an array or an object that implements Countable #32

Closed rizraz closed 6 years ago

rizraz commented 6 years ago

Hi, this warning I get after update php to version 7.2: "Warning : count(): Parameter must be an array or an object that implements Countable in ~/modules/mod_osmod/heler.php on line 35"

Since php 7.2 an argument of count may be not NULL or empty.

My workaround is: if (!empty($params->get('scale'))) { .... }

Schlumpf commented 6 years ago

Hi, yes you are right. Maybe you could test the fix? https://github.com/Schlumpf/osmodul/archive/php72-fix.zip I'll publish a new version if it works fine.

rizraz commented 6 years ago

Hi Schlumpf, thank you, for me it works. No error messages anymore.

Schlumpf commented 6 years ago

Fixed in v2.16.

Please note that OSModul has moved to Gitlab: https://gitlab.com/schlumpf/osmodul