PDA

View Full Version : Warning Messages in Advanced Search vB 422


nerbert
08-13-2014, 02:02 PM
Using vB 4.2.2 in PHP 5.4.30

I recently upgraded to vB 422 and started getting these messages above the Advanced Search page (search.php)

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 261

Warning: Declaration of vBForum_Item_SocialGroupDiscussion::getLoadQuery() should be compatible with vB_Model::getLoadQuery($required_query = '', $force_rebuild = false) in ..../packages/vbforum/item/socialgroupdiscussion.php on line 337

There's an old thread on this from a year ago https://vborg.vbsupport.ru/showthread.php?t=303157&highlight=warning but I thought I would discuss a better fix than tinkering with error reporting

There are three files with the method getLoadQuery()

vb/model.php, line 481

packages/vbforum/item/socialgroupdiscussion.php line 129

packages/vbforum/item/socialgroupmessage.php line 113


In the last two files I changed the first line to read

protected function getLoadQuery($required_query = '', $force_rebuild = false)


This makes the line in the last two files identical to the first. That got rid of the warning messages but I don't use socal group messages or discussions so I don't know if these changes are messing anything up.

So, two questions:

Is anyone else getting these warnings?

Does my fix mess anything up ?

ForceHSS
08-13-2014, 02:10 PM
There are many posts on this and many fixes have been also posted there are other files that need to be edited for 4.2.2

packages\vbforum\item
socialgroupmessage.php
socialgroupdiscussion.php

includes
class_core.php

clientscript\yui\uploader\assets
uploader
https://vborg.vbsupport.ru/showthread.php?t=307008
If you want send me the first 3 files above and I can edit them for you

nerbert
08-13-2014, 05:27 PM
I would prefer editing instructions so I can record what I've done. Are my edits to the first two files the same as yours?

ForceHSS
08-13-2014, 05:30 PM
protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)Needs to be this code for both files

For class_core.php starting at line 5688 stopping at line 5692

case E_NOTICE:
case E_STRICT:
case E_DEPRECATED:
// Just ignore these completely //
break;
You might also need to add the date to the bottom of your php.ini file something like this
[date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Chicago"

; http://php.net/date.default-latitude
date.default_latitude = 31.7667

; http://php.net/date.default-longitude
date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333

You will find the correct info in your admincp/Maintenance/View PHP Info

nerbert
08-13-2014, 08:33 PM
Thanks.

stog
02-14-2015, 10:14 AM
confused are you saying we need to change line 1

from <?php if (!defined('VB_ENTRY')) die('Access denied.');

to protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)

in the 2 item files

-----

ok found answer in another thread1. - Edit the files "socialgroupmessage.php" and "socialgroupdiscussion.php" found in "packages/vbforum/item/"

2. - The original function reads:

protected function getLoadQuery($required_query, $force_rebuild = false)

3. - Change the function to this:

protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)


i have also replaced lines 5688 through to 5692 inclusive of the class_core.php file with the code
case E_NOTICE:
case E_STRICT:
case E_DEPRECATED:
// Just ignore these completely //
break;


this replaced
case E_NOTICE:
// Just ignore these completely //
break;

case E_WARNING:

ozzy47
02-14-2015, 10:18 AM
Don't do the above, just do this.

Open your includes/config.php file and below <?php add the following.

define('SKIP_DS_ERRORS', true); So it looks like this:
<?php
define('SKIP_DS_ERRORS', true);
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 4.2.2 Use a editor like notepad++ (http://notepad-plus-plus.org/download/v6.6.8.html) to edit any files, don't use Notepad or Wordpad.
--------------------------