[geeklog-cvs] geeklog: Workaround to avoid "argument is not an array" error if...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Mar 4 13:34:09 EST 2012


changeset 8508:ff0b1ba07d05
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/ff0b1ba07d05
user: Dirk Haun <dirk at haun-online.de>
date: Sun Mar 04 19:32:04 2012 +0100
description:
Workaround to avoid "argument is not an array" error if something happens to go wrong during the install and we want to log it to error.log (based on a report by Toshiaf)

diffstat:

 system/lib-plugins.php |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 0f0ce5bf5a57 -r ff0b1ba07d05 system/lib-plugins.php
--- a/system/lib-plugins.php	Sun Mar 04 10:58:58 2012 +0100
+++ b/system/lib-plugins.php	Sun Mar 04 19:32:04 2012 +0100
@@ -1552,6 +1552,13 @@
     require_once $_CONF['path_system'] . 'lib-story.php';
     require_once $_CONF['path_system'] . 'lib-user.php';
 
+    if (! is_array($_PLUGINS)) {
+        /** as a side effect of parsing autotags in templates, we may end
+         *  up here from a call to COM_errorLog() during the install, i.e.
+         *  when Geeklog is not fully operational, so we need to catch this
+         */
+        $_PLUGINS = array();
+    }
     $all_plugins = array_merge($_PLUGINS, array('story', 'user'));
     
     $autolinkModules = array();



More information about the geeklog-cvs mailing list