MyBB Community Forums

Full Version: the following warning occured
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when i upgraded to the newest mybb and copied files when it finished i get this message on the main page of my website

The following warnings occurred: Warning [2] Invalid argument supplied for foreach() - Line: 331 - File: global.php PHP 5.4.14 (Linux)

This might be a bug with $theme['disporder'] not being an array somehow: Moving to bug reports for checking.

EDIT: it might happen if you update the order or delete all stylesheets in an older version of MyBB, where the checks weren't that strict. Not sure about other possible causes. We can simply add an is_array() check as a workaround.
So can you confirm this issue Destroy? If so please push this.
(2016-01-01, 02:30 PM)BBMercury Wrote: [ -> ]I just got this error too, found this thread in Google. How do I fix this?

I mentioned a code fix above. But you should rather update your theme's stylesheets order in ACP to a correct one.


Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github:

Thanks for contributing to MyBB!

The MyBB Group
IT WAS FIXED (in MyBB 1.8.7)