vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Fatal error: Cannot pass parameter 1 by reference (https://vborg.vbsupport.ru/showthread.php?t=252275)

BirdOPrey5 10-19-2010 01:46 PM

Fatal error: Cannot pass parameter 1 by reference
 
I'm getting this error:

Fatal error: Cannot pass parameter 1 by reference in /***file path removed***/includes/class_postbit.php(294) : eval()'d code on line 33

Line 33 in class_postbit.php is blank. the few lines around it are:
Code:

* Bitfield value which determines whether a user's reputation power should be displayed with their post.
*/
define('POST_SHOW_REPPOWER', 2);

/**
* Bitfield value which determined whether a user sees another user' infractions
*/
define('POST_SHOW_INFRACTION', 4);

Reputation and infractions have nothing to do with what I'm working on...

I added a plugin to postbit_display_compelete to try out some code that isn't working but not sure why... the offending lines are:

Code:

include('functions_forumlist.php');

$sico = fetch_forum_lightbulb(2, array(), 2);

I'm guessing the problem is one of the parameters of the function but I don't see why this is a problem... in the code in forumlist.php the function takes an int, an array, and an int... the ints are forumid's... The purpose of this function is to get the info on whether there are new posts in that forum.

Lynne 10-19-2010 01:56 PM

Joe,

This line...
Code:

includes/class_postbit.php(294) : eval()'d code on line 33
How to read....
File: class_postbit.php
Line: 294 of class_postbit.php

That is most likely a plugin and then you need to look at line 33 of the plugin. Trick there is that sometimes there are several plugins using that hook and you don't know which line 33 is. You can look at the datastore table and find the row with the plugin stuff and look there, if needed.

BirdOPrey5 10-19-2010 02:10 PM

ahh thanks... good to know.

Simon Lloyd 10-19-2010 05:09 PM

Joe, if you google Max beauty, download it and then when you view the page of your forum that causes the error, right click, view source and max beauty will open with the source code for everything used to render that page and line numbers, also before you do this turn on template headers/titles in your admincp so you can see which piece of code is being called from which template :)

Hope that helps.

BirdOPrey5 10-19-2010 07:52 PM

I'll take a look at max beauty thanks...

The reason for this particular error was that I hard coded the forum id's in the function call... even though the function takes integers it requires they be in variables... once I set them to a couple of variable names the error went away. :up:

Simon Lloyd 10-19-2010 08:27 PM

Cool!

Oh, you might like this for comparing text too http://diffchecker.com/index.php?action=diff

BirdOPrey5 10-19-2010 09:10 PM

thanks... looks interesting for quick checks... I already have WinMerge which does basically the same thing.


All times are GMT. The time now is 01:11 PM.

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.01049 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_code_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