vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Warning Messages in Advanced Search vB 422 (https://vborg.vbsupport.ru/showthread.php?t=313670)

nerbert 08-13-2014 02:02 PM

Warning Messages in Advanced Search vB 422
 
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/showthrea...hlight=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

Code:

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

1 Attachment(s)
Code:

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

Code:

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
Code:

[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
Code:

<?php if (!defined('VB_ENTRY')) die('Access denied.');
to
Code:

protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)
in the 2 item files

-----

ok found answer in another thread
Quote:

1. - 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
Code:

case E_NOTICE:
        case E_STRICT:
        case E_DEPRECATED:
            // Just ignore these completely //
        break;

this replaced
Code:

                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.

PHP Code:

define('SKIP_DS_ERRORS'true); 

So it looks like this:
PHP Code:

<?php
define
('SKIP_DS_ERRORS'true);  
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.2.2

Use a editor like notepad++ to edit any files, don't use Notepad or Wordpad.
--------------------------


All times are GMT. The time now is 12:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01074 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete