wpsight / wpcasa

WPCasa WordPress Real Estate
https://wpcasa.com
GNU General Public License v2.0
42 stars 23 forks source link

Warning: count() on listing detail page #99

Closed codestylist closed 5 years ago

codestylist commented 5 years ago

On listing detail page, above the agent information, I get the message

Warning: count(): Parameter must be an array or an object that implements Countable in \wp-content\plugins\wpcasa\includes\class-wpsight-helpers.php on line 607

Not a big deal but it should be fixed.

florianrusch commented 5 years ago

The error refers to the following line: https://github.com/wpsight/wpcasa/blob/c983038daca4561e8f6292dc19405b4d4da3e9d5/wpcasa/includes/class-wpsight-helpers.php#L607

It shouldn't fail. The is_array must return true else the count() isn't parsed. @codestylist could you take a look into the file and show us the code from the line 607?

codestylist commented 5 years ago

Thank you @florianrusch for your reply. The file I have downloaded from wordpress.org with version 1.0.6.1 hasn't this extra check. So, I already added it by myself and no message anymore. Hope this will be transfered to WordPress repository one day ;-)

florianrusch commented 5 years ago

I think the development process and this repo are not very close currently. But maybe @JoeHana can bring some light into this?