The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#31
|
|||
|
|||
Has anyone seen these warnings in admincp?
Warning: Declaration of vB_Database_Alter_MySQL::add_index() should be compatible with that of vB_Database_Alter::add_index() in ..../includes/class_dbalter.php on line 882 Warning: Declaration of vB_Database_Alter_MySQL::add_field() should be compatible with that of vB_Database_Alter::add_field() in ..../includes/class_dbalter.php on line 882 Warning: Declaration of vB_Database_Alter_MySQL::drop_field() should be compatible with that of vB_Database_Alter::drop_field() in ..../includes/class_dbalter.php on line 882 Warning: Declaration of vB_Database_Alter_MySQL::query() should be compatible with that of vB_Database_Alter::query() in ..../includes/class_dbalter.php on line 882 I searched for the generic warning language and at stackoverflow various posters said when one class extends another the methods' arguments must match exactly, including defaults. So for example on line 242 we have Code:
function add_index($fieldname, $fields, $type, $overwrite) {} and on line 518 Code:
function add_index($fieldname, $fields, $type = '', $overwrite = false) { $this->init_table_info(); . . . . . . . . . . It looks like all you'd have to do is edit in the defaults in the first method, and likewise for the other incompatibilities in the warnings. But I would want to test this before recommending it here, after all, this stuff alters database structure. So when do these warnings happen? |
#32
|
||||
|
||||
|
#33
|
|||
|
|||
The code I posted is straight off my vb4.2.2. PL 1 installation.
|
#34
|
||||
|
||||
Quote:
e.g. Line 242: Code:
function add_index($fieldname, $fields, $type, $overwrite) Code:
function add_index($fieldname, $fields, $type = '', $overwrite = false) The functions add_index, add_field, drop_field and query all have a default value missing in their declarations in the base class. |
#35
|
||||
|
||||
Quote:
Curiously, I cannot get those errors to show up on my php 5.4 install at all, not sure why. Its also quite odd that no one has ever reported them either (other than the comment in this thread). Regardless, it does look like they need more changes to be fully correct, which have now been applied in 4.2.3. |
Благодарность от: | ||
ozzy47 |
#36
|
|||
|
|||
I found an obscure one for you, Paul M. This is an illegal string offset warning in Who's Online that I'm sure occurs only if you have the Blog product. The warnings arise from $wol_user["$seeuserid"]['username'] and $wol_user["$seeuserid"]['musername']. I print_r()'d $wol_user and some of its elements were simple usernames, others were arrays of username and musername. Apparently the simple username values come from a blog plugin in hook location "online_ids_titles" (includes/functions_online.php, line 2499), which calls function blog_online_ids_titles() in includes/blog_functions_online.php, line 82. The problem seems to come at line 159. I think the code there should be similar to the code at lines 2494 and 2495 in includes/functions_online.php
--------------- Added [DATE]1421897642[/DATE] at [TIME]1421897642[/TIME] --------------- UPDATE: I think the following edits resolve the problem: line 159, includes/blog_functions_online.php Code:
//$wol_user["$userresult[userid]"] = $userresult['musername']; $wol_user["$userresult[userid]"]['musername'] = $userresult['musername']; $wol_user["$userresult[userid]"]['username'] = $userresult['username']; line 414 (as numbered after the first edit), includes/blog_functions_online.php Code:
//$blogtitle = $wol_bloguser["$userid"]['title'] ? $wol_bloguser["$userid"]['title'] : $wol_user["$userid"]; $blogtitle = $wol_bloguser["$userid"]['title'] ? $wol_bloguser["$userid"]['title'] : $wol_user["$userid"]['username']; |
#37
|
|||
|
|||
Did you submit your issue to the bugtracker yet nerbert?
|
#38
|
|||
|
|||
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|