summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Memcached_DataObject.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 2cc6377f8..b60aa7911 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -428,7 +428,7 @@ class Memcached_DataObject extends DB_DataObject
//
// WARNING WARNING if we end up actually using multiple DBs at a time
// we'll need some fancier logic here.
- if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS'])) {
+ if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS']) && php_sapi_name() == 'cli') {
foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $index => $conn) {
if (!empty($conn)) {
$conn->disconnect();