From 8655a3334d7cee94d4c36baf05401237f7d74dc7 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 22 Nov 2010 12:49:44 +0000 Subject: Refs #2673 moved changes into trunk from 1.7 branch git-svn-id: http://code.elgg.org/elgg/trunk@7417 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 2 +- engine/lib/plugins.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/engine/lib/database.php b/engine/lib/database.php index 3170f3ac1..da068effd 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -156,7 +156,7 @@ function db_profiling_shutdown_hook() { * @return void */ function db_delayedexecution_shutdown_hook() { - global $DB_DELAYED_QUERIES, $CONFIG; + global $DB_DELAYED_QUERIES; foreach ($DB_DELAYED_QUERIES as $query_details) { // use one of our db functions so it is included in profiling. diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 3649fddb7..c0ec7f389 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -837,9 +837,11 @@ function is_plugin_enabled($plugin, $site_guid = 0) { $ENABLED_PLUGINS_CACHE = $enabled_plugins; } - foreach ($ENABLED_PLUGINS_CACHE as $e) { - if ($e == $plugin) { - return true; + if (is_array($ENABLED_PLUGINS_CACHE)) { + foreach ($ENABLED_PLUGINS_CACHE as $e) { + if ($e == $plugin) { + return true; + } } } -- cgit v1.2.3