My forum also goes Bonk - Nillablog error
Hi there, thanks for taking the time to read my question. You see, my forum goes Bonk whenever I try and use this awesome theme of yours, and I really want to make it work correctly.
I already read the other question that says my forum goes bonk, and it didn't really help me at all, so I decided to start my own.
Here's the error that came up when using the debug code posted in the other question: pastie.org/3561720
The plugins that I'm using:
-Emotify
-Flagging
-Mcserver
-Minecraftatar
-Nillablog
-Split/Merge
-Tagging
-Topposters
-Twitter feeds
-Vanilla statistics
-Voting
-Who's online
-CLeditor
Best Answer
-
UnderDog MVP
Good job pasting the debug information in pastie.
Here's the error you should focus on:Fatal Error in NillaBlog.DiscussionModel_BeforeGet_Handler();
array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object
The error occurred on or near:
/public_html/plugins/NillaBlog/class.nillablog.plugin.phpIt probably has nothing to do with the theme you're using
It could be debugged easily, if you're up for it.
170: $Wheres = $Sender->EventArguments["Wheres"]; 171: if (!array_key_exists("d.CategoryID", $Wheres) || !in_array($Wheres["d.CategoryID"], C("Plugins.NillaBlog.CategoryIDs"))) 172: return;
I think what happens here is that the $Wheres is an empty string (''). array_key_exists expects an array or an object and something else is passed, so, something is wrong when
$Wheres = $Sender->EventArguments["Wheres"]; gets executed.You either figure out what is returned or add a little logic to the nillablog code:
if(!array($Wheres)) { echo "something is wrong and Wheres is not an array"; } else { 171: if (!array_key_exists("d.CategoryID", $Wheres) || !in_array($Wheres["d.CategoryID"], C("Plugins.NillaBlog.CategoryIDs"))) 172: return; }
sorry, bad coding, but this will trigger some responses from the actual coders (hopefully)
There was an error rendering this rich post.
0
Answers
Good job pasting the debug information in pastie.
Here's the error you should focus on:
Fatal Error in NillaBlog.DiscussionModel_BeforeGet_Handler();
array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object
The error occurred on or near:
/public_html/plugins/NillaBlog/class.nillablog.plugin.php
It probably has nothing to do with the theme you're using
It could be debugged easily, if you're up for it.
I think what happens here is that the $Wheres is an empty string (''). array_key_exists expects an array or an object and something else is passed, so, something is wrong when
$Wheres = $Sender->EventArguments["Wheres"]; gets executed.
You either figure out what is returned or add a little logic to the nillablog code:
sorry, bad coding, but this will trigger some responses from the actual coders (hopefully)
There was an error rendering this rich post.
You're correct. It's not an error with the plugin, look at my post here for more info:
vanillaforums.org/discussion/19374/my-forum-goes-bonk-when-applying-themes
@RegretZero : please see PM
There was an error rendering this rich post.