MyBB Community Forums

Full Version: count() - functions_calendar.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone else get this PHP warning?

 Error String: count(): Parameter must be an array or an object that implements Countable
 Error File: /home/testing/mybb1820/inc/functions_calendar.php
 Error Line: 133
a plugin incompatibility? Try disabling your plugins to see what happens
Tested on a vanilla install.

Tested on PHP 5.6 = No Error.
Tested on PHP 7.2 = Error
I can confirm it. It try to get the array count also if the index is not set: https://github.com/mybb/mybb/blob/featur...r.php#L132
Error suppression doesn't work to all.
Just came across this thread, looks like you have already opened this up on github for us.

Good spot and thank you for contributing!

https://github.com/mybb/mybb/pull/3626