MyBB Community Forums

Full Version: Strange Warning Error on Index Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am getting this warning error on my index page after upgrading mySQL and PHP...anyone know what would cause such thing?

The following warnings occurred:
Warning [2] Illegal string offset 'cid' - Line: 427 - File: inc/functions_calendar.php PHP 5.4.25 (Linux)

File Line Function
/inc/functions_calendar.php 427 errorHandler->error
/inc/plugins/upc_events.php 87 get_events
/inc/class_plugins.php 101 upc_events
/index.php 25 pluginSystem->run_hooks

I added a screen cap to show how it appears on the screen.
see this response - it suits your referred issue ..
I am on MyBB v. 1.6.12 shouldn't that fix any php5.4 issues?

My host issued this info...

Quote:From what I am able to tell this error is coming the file [ /home/xxxxxxx/public_html/7173mustangs.com/inc/functions_calendar.php ], on line 427, specifically the following function at the beginning of that line:

WHERE e.cid='{$calendar['cid']}'

For whatever reason it doesn't seem to like this 'cid' offset being re-declared, from what I am seeing changing the above function to the following will resolve the error:

WHERE e.cid='{$calendar}'

We unfortunately do not provide coding support, so I will be unable to assist with making the change myself. If you are still experiencing issues afterwards I would recommend contacting the developers of MyBB, I did find a similar bug report on their site at [ http://dev.mybb.com/issues/2012 ].

I made the change as instructed and the warning is gone. Question is...will this change affect anything else or am I good to go? Also, I have 2 other MyBB forums on the same server and neither one displayed this warning after the php upgrade.
IIRC, MyBB 1.6.12 is not fully compatible with php 5.4 and as you know, hiding php warnings doesn't do any harm
Cool! I am loving php 5.4's speed so I am going to stick with it!
(2014-02-20, 01:37 PM).m. Wrote: [ -> ]IIRC, MyBB 1.6.12 is not fully compatible with php 5.4 and as you know, hiding php warnings doesn't do any harm
MyBB 1.6.12 is fully compatible with PHP 5.4 and 5.5. This error is obviously caused by a plugin: /inc/plugins/upc_events.php
^ oh, Thank You.

@RocketFoot, which plugin you are using for the calendar events
(2014-02-20, 02:10 PM).m. Wrote: [ -> ]^ oh, Thank You.

@RocketFoot, which plugin you are using for the calendar events

The only thing I can think of is this:

Event Thread (1.0)
This plugins automatically creates a new thread in a specified forum whenever a new event was created in one of the specified calendars.
Created by Aries-Belgium

I could just remove it...I don't really use it on my forum anymore.

ETA: I did remove the plugin and reverted the change listed above but the warning came back! I redeployed the change above and all is good again (with 1 less useless plugin)