View Full Version : PHP error
Snowhog
12-31-2014, 04:36 AM
We migrated our vBulletin 4.2.2 forum over to a new server and began getting php errors in various areas of the forum. This one I don't know how to fix. It is triggered when we click on the Advanced Search link.
Warning: Declaration of vBForum_Item_SocialGroupMessage::getLoadQuery() should be compatible with vB_Model::getLoadQuery($required_query = '', $force_rebuild = false) in ..../packages/vbforum/item/socialgroupmessage.php on line 0
We are using PHP 5.5.9 (Ubuntu).
ozzy47
12-31-2014, 04:40 AM
In includes/class_core.php locate lines 5683-5685 which should be this.
case E_NOTICE:
// Just ignore these completely //
break;And change it to this.
case E_NOTICE:
case E_STRICT;
case E_DEPRECATED;
// Just ignore these completely //
break;
Snowhog
12-31-2014, 04:49 AM
So that it looks like this:
case E_NOTICE:
// Just ignore these completely //
break;
case E_NOTICE:
case E_STRICT;
case E_DEPRECATED;
// Just ignore these completely //
break;
Ah, okay. I 'got it'. Change to this:
case E_NOTICE:
case E_STRICT;
case E_DEPRECATED;
// Just ignore these completely //
break;
ozzy47
12-31-2014, 04:59 AM
Yeah change it to that.
Snowhog
12-31-2014, 04:59 AM
That fixed it! Thank you ozzy!! Thank you VERY much!!!
ozzy47
12-31-2014, 05:00 AM
Not a problem, glad to help. :)
Snowhog
12-31-2014, 05:08 AM
We were also getting php errors concerning preg_replace() /e being depricated and to use preg_replace_callback() instead. For each reported occurrence, I made the change in the affected .php file. Would I not have had to do that with this fix??
ForceHSS
12-31-2014, 05:20 AM
update to 4.2.3 all fixes are in there or see the link in my sig
Snowhog
12-31-2014, 05:29 AM
vBulletin 4.2.3 ?? We are running 4.2.2 Patch Level 3.
AndrewSimm
12-31-2014, 05:58 AM
vBulletin 4.2.3 ?? We are running 4.2.2 Patch Level 3.
4.2.3 is considered a beta but it runs fine.
ozzy47
12-31-2014, 08:30 AM
We were also getting php errors concerning preg_replace() /e being depricated and to use preg_replace_callback() instead. For each reported occurrence, I made the change in the affected .php file. Would I not have had to do that with this fix??
Probably a error with a mod, see if you can find out which one.
Snowhog
01-01-2015, 09:11 PM
ozzy47 -
We are now running 4.2.3 Beta 3. Should I undo the fixes identified and made in this thread?
ozzy47
01-01-2015, 09:13 PM
You can try, I am not sure if they are needed or not, as I have not upgraded any of my sites to 4.2.3 just yet.
Snowhog
01-01-2015, 09:24 PM
I guess my real question should have been, is it necessary to undo the changes? So far, everything is working as expected. Rule of thumb is, "If it ain't broke, don't fix it." As nothing is presenting as broke, I wont 'fix' the 'fixes' I fixed. :eek: :D
ozzy47
01-01-2015, 09:27 PM
Well the change I told you to do in post #2 would have been overwritten when you loaded the new files to the server. As well as any other changes you made to the core files. :)
Paul M
01-01-2015, 09:55 PM
In includes/class_core.php locate lines 5683-5685 which should be this.
case E_NOTICE:
// Just ignore these completely //
break;And change it to this.
case E_NOTICE:
case E_STRICT;
case E_DEPRECATED;
// Just ignore these completely //
break;
This is/was completely unnecessary.
To turn off the extra warning/error reporting in 4.2.2 use SKIP_DS_ERRORS - see this post (http://www.vbulletin.com/forum/forum/vbulletin-announcements/vbulletin-announcements_aa/4000121-vbulletin-4-2-2-full-has-been-released?p=4000466#post4000466).
Its already fixed in 4.2.3.
Snowhog
01-01-2015, 09:56 PM
Ah, true. I like that even better, as that means that all is working as it should. No bandaids. Cool.
ozzy47
01-01-2015, 09:56 PM
While it may be unnecessary, I prefer not doing the hiding of all the warnings if at all possible. :)
Paul M
01-01-2015, 09:59 PM
Um, you do realise thats exactly what your change did, just by an unnecessary edit to a core file rather than by the designed method. ;)
ozzy47
01-01-2015, 10:00 PM
Yes, but that was for one error only, or did that disable all of them as well?
Paul M
01-01-2015, 10:03 PM
All E_STRICT & E_DEPRECATED warnings.
ozzy47
01-01-2015, 10:07 PM
Cool. Only reason I had mentioned it anyway is because some users had reported the skip errors not working, but I am willing to bet they did not add it right to begin with. :)
Paul M
01-01-2015, 10:13 PM
If they downloaded 4.2.2 in the first two weeks after it was released, it may not work, they should download the current version and replace class_core.php.
ozzy47
01-01-2015, 10:14 PM
Excellent, good to know. Thanks for the info sir. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.