PDA

View Full Version : Unfamiliar PHP Error Message


Digital Jedi
12-15-2013, 05:19 PM
http://www.cogonline.net/forums/profile.php?do=editattachments
http://www.cogonline.net/forums/misc.php?do=bbcode

Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in...

I am going to go through my mods one by one, as it does go away if I disable the plugin system. I'm just unfamiliar with this particular PHP error, and am not sure where best to look first. Looking at Stack Overflow isn't really clarifying this one for me.

ozzy47
12-15-2013, 05:22 PM
Looks like it has something to do with the smiles.

Digital Jedi
12-15-2013, 05:33 PM
Even when viewing my attachments list?

ozzy47
12-15-2013, 05:40 PM
If there is a bbcode in it, from what I can tell.

Digital Jedi
12-15-2013, 06:07 PM
If there is a bbcode in it, from what I can tell.
Maybe I've just been at this for too many days in a row, but why would their be BB Code in my attachments list, exactly? :confused:

ozzy47
12-15-2013, 06:11 PM
I do not know, I am just surmising on what I have read about that error, http://www.vbulletin.com/forum/forum/vbulletin-3-8/vbulletin-3-8-questions-problems-and-troubleshooting/383826-bbcode-and-img-code-on-misc-php-show-fatal-error

--------------- Added 1387135292 at 1387135292 ---------------

Actually now that I think about it, I am looking at code for vB4. :(

What is the code in your misc.php file around line 482?

Digital Jedi
12-15-2013, 06:29 PM
I was just looking at that. For profile.php its: eval('$template[\'attachmentlistbits\'] .= "' . fetch_template('modifyattachmentsbit') . '";');


And for misc.php it's: eval('$template[\'bbcodebits\'] .= "' . fetch_template('help_bbcodes_bbcode') . '";');

ozzy47
12-15-2013, 06:31 PM
Then I would have to guess it has something to do with the help for the bbcodes.

kh99
12-15-2013, 06:58 PM
My guess is that one of your plugins is using $template as a string, so it's interfering with some vb code that uses it as an array. If you don't know which one, you might want to try my "search in plugins" mod to find it.

Digital Jedi
12-15-2013, 08:09 PM
Well, after going through all products and disabling one by one (or five by five, rather) nothing seemed to stop the error. Yet disabling hooks does. Thanks for the search plugin mod. I haven't found anything yet, but I'll keep looking.

kh99
12-15-2013, 08:13 PM
Hmm...well, I guess one possibility is that the "search plugins" mod wouldn't find it if the problem code is in an included file. And if the code is in more than one plugin (or included by more than one) then you might not find it by disabling plugins one by one (or five by five). (Edit:...oh, unless you ultimately disabled them all, then I guess it should have gone away at some point).

Of course it could also just be that I'm wrong.

BirdOPrey5
12-15-2013, 09:17 PM
For http://www.cogonline.net/forums/misc.php?do=bbcode

It is definitely from a plugin om the help_bbcodes_bbcode hook.

That isn't a very commonly used hook in mods in my experience- see how many plugins you have on that hook, I would be surprised if it is more than 1.

If it is one, the problem is one line 24 of that plugin.

Digital Jedi
12-15-2013, 10:01 PM
Hmm...well, I guess one possibility is that the "search plugins" mod wouldn't find it if the problem code is in an included file. And if the code is in more than one plugin (or included by more than one) then you might not find it by disabling plugins one by one (or five by five). (Edit:...oh, unless you ultimately disabled them all, then I guess it should have gone away at some point).

Of course it could also just be that I'm wrong.
Yup, disabling hooks clears the problem just fine. Either manually or in the Admin CP. Disabling whole groups of products doesn't seem to do the trick, though. I can only assume its what's technically referred to as one of those weird thingys.

For http://www.cogonline.net/forums/misc.php?do=bbcode

It is definitely from a plugin om the help_bbcodes_bbcode hook.

That isn't a very commonly used hook in mods in my experience- see how many plugins you have on that hook, I would be surprised if it is more than 1.

If it is one, the problem is one line 24 of that plugin.
Could not find a plugin that used that hook. In fact, only found one that even referenced a BB Code function at all, and it's been disabled for a while now. EDIT: Correction. I should do a search for "bbcode", as well as "bbcodes". [sigh] BRB

kh99
12-15-2013, 10:04 PM
Yup, disabling hooks clears the problem just fine. Either manually or in the Admin CP. Disabling whole groups of products doesn't seem to do the trick, though. I can only assume its what's technically referred to as one of those weird thingys.


Did you try the plugin manager? Maybe it's a plugin that has the product set to "vbulletin" or something like that, so it's not disabled by disabling any product.

Digital Jedi
12-15-2013, 10:14 PM
Just tried that now on your suggestion, but none of those either. I'll just have to keep digging.

BirdOPrey5
12-16-2013, 12:16 AM
<span style="text-decoration: line-through">You went to the plugin manager in Admin CP (plugin not product), hit CTRL+F on the keyboard to bring up "Find on Page" in your browser, and pasted in:

help_bbcodes_bbcode

And it didn't find anything? That is virtually impossible with the error message you are getting- so much so i'd ask are you sure you are in the right admincp?</span>

Misread the code.

Digital Jedi
12-16-2013, 01:39 AM
Actually, I was using kh99's modification to search the plugins for the template name. But, no, nothing is using that hook, either. I don't know what to tell ya. :)

kh99
12-16-2013, 10:27 AM
Well, the lines posted in post #7 seem to show that the problem is with template eval lines and not a hook. Also if the problem were in one of the misc_bbcode hooks, it wouldn't happen in profile.php. But they both use a $template array, so I still think that's your issue. I can reproduce the problem by creating a plugin using hook parse_templates and code:
$template = "test";


So maybe if you created a plugin using hook misc_bbcode_start and code like this:
if (gettype($template) == 'string')
{
die ('$template='.$template);
}


Then go to the bbcode page, it might give you a clue about where it's being used (or if you never see that message, then I really am wrong).

Digital Jedi
12-16-2013, 11:58 AM
Well, the lines posted in post #7 seem to show that the problem is with template eval lines and not a hook. Also if the problem were in one of the misc_bbcode hooks, it wouldn't happen in profile.php. But they both use a $template array, so I still think that's your issue. I can reproduce the problem by creating a plugin using hook parse_templates and code:
$template = "test";


So maybe if you created a plugin using hook misc_bbcode_start and code like this:
if (gettype($template) == 'string')
{
die ('$template='.$template);
}


Then go to the bbcode page, it might give you a clue about where it's being used (or if you never see that message, then I really am wrong).
You know, the very first thing I tried was turning all of my custom products/plugins off, even going so far as to delete some of them for re-import later, and that never worked. It was, in fact, one of the first ones I had worked on, which was using $template as a variable on parse_templates. Sheesh. I don't know how I could have missed that. Thanks for that. I guess I've just been in my Admin CP too long the last couple of weeks.