Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 06-02-2017, 07:06 PM
SnakeEaterITA SnakeEaterITA is offline
 
Join Date: Jul 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default PHP problem in class_bootstrap.php

Hi everyone,

I recently updated to 4.2.5 and I started getting tons of PHP error messages:

Code:
[02-Jun-2017 22:16:04 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
[02-Jun-2017 22:16:04 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
[02-Jun-2017 22:16:14 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
[02-Jun-2017 22:16:14 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
[02-Jun-2017 22:16:14 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
[02-Jun-2017 22:16:14 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
[02-Jun-2017 22:16:14 Europe/Rome] PHP Strict Standards:  Only variables should be passed by reference in /home/laplayst/public_html/forum/includes/class_bootstrap.php(564) : eval()'d code on line 60
Line 564 is

($hook = vBulletinHook::fetch_hook('process_templates_compl ete')) ? eval($hook) : false;

Line 60 is an empty one under

public $group_templates = array();


Do you have any idea how I could solve this problem?
Reply With Quote
  #2  
Old 06-02-2017, 07:25 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It means that one of your plugins that is hooked into process_templates_complete has this problem on line 60 (in the hook).
My guess is that there's a declaration using =& somewhere, removing the ampersand sign should fix it.
Reply With Quote
2 благодарности(ей) от:
Lynne, SnakeEaterITA
  #3  
Old 06-02-2017, 07:33 PM
SnakeEaterITA SnakeEaterITA is offline
 
Join Date: Jul 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow thanks for the quick reply, really appreciated!

Does it mean I'd have to go through my plugins one by one, and check all of them at line 60?

If I am not wrong =& is basically a pointer? But wouldn't changing it to = change the way data is handled ?
Reply With Quote
  #4  
Old 06-02-2017, 07:40 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Go to your AdminCP > Plugins & Products > Plugin Manager > CTRL + F and search for process_templates_complete hooks.

For each match found click on edit and look around line 60 for =& or some function that makes use of old standards. Feel free to paste line 58-62 here so we can take a look.

Changing it to =& shouldn't deal any damage, vBulletin changed all =& to = in the latest vBulletin version if I recall correctly in order to support PHP 7.
Reply With Quote
  #5  
Old 06-02-2017, 07:54 PM
SnakeEaterITA SnakeEaterITA is offline
 
Join Date: Jul 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is only one plugin that has many lines of code (the others just have just a couple)

And this is the one

Starting on line 56

Code:
if($uidx[$titulo] != ""){
		$usergroup = $uidx[$titulo];
		
		if (is_member_of($vbulletin->userinfo, $usergroup)){

			global $template_hook;
			$templater->register('target',$target);
			$templater->register('url',$url);
			$templater->register('selectedtabs',$selectedtabs);
			$templater->register('subnavlinks',$subnavlinks);
			$templater->register('filename', $filename);
			$template_hook[$vbulletin->options['vbhtabslcr']] .= $templater->render();
		}
		}else{


			$templater->register('target',$target);
			$templater->register('url',$url);
			$templater->register('selectedtabs',$selectedtabs);
			$templater->register('subnavlinks',$subnavlinks);
			$templater->register('filename', $filename);
			$template_hook[$vbulletin->options['vbhtabslcr']] .= $templater->render();
		}
	}
Reply With Quote
  #6  
Old 06-02-2017, 08:00 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't see anything wrong but you can try disabling the plugin which uses this hook and see if that fixes it. That way we can be certain it's this hook.
Reply With Quote
  #7  
Old 06-02-2017, 09:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When the hooks are stored in the database, ALL the hooks using the process_templates_complete location are stored 'on top of each other' (one after another). If one is only 10 lines, then the next is 70 lines, then line "60" or the error could be line 60 of the second plugin if it was stored first OR line 50 of the second plugin if it was stored second. So, you actually need to look at all the plugins using that hook location to find the problem one.
Reply With Quote
Благодарность от:
CAG CheechDogg
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:59 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.03686 seconds
  • Memory Usage 2,219KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (3)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete