A plugin I released seems to be causing some errors for people, although I can not duplicate it. Can anyone find an issue with this code:
Code:
<plugins>
<plugin active="1">
<title><![CDATA[Inactivity Timer [Optional]]]></title>
<hookname>global_start</hookname>
<phpcode><![CDATA[$headerstime = time();]]></phpcode>
</plugin>
<plugin active="1">
<title><![CDATA[Welcome Headers [Alteration]]]></title>
<hookname>parse_templates</hookname>
<phpcode><![CDATA[
eval('$welcomeheaders = "' . fetch_template('welcome_headers') . '";');
]]></phpcode>
</plugin>
<plugin active="1">
<title><![CDATA[Welcome Headers [Template Cache]]]></title>
<hookname>fetch_userinfo</hookname>
<phpcode><![CDATA[
global $globaltemplates;
$globaltemplates = array_merge($globaltemplates, array('welcome_headers'));
]]></phpcode>
</plugin>
</plugins>
And the error peopel get:
Quote:
I get an error at the top of the any of thr "Plugin Sytem" menu areas in the acp that says:
---------------------------------
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions.php(1051) : eval()'d code on line 9
---------------------------------
It seems though, when I goto the "Plugin Manager" and uncheck the "Hook Location : "Welcome Headers [Alteration]" under the "parse_templates" section, the error goes away.
|