We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit f54584c1 authored by mattl's avatar mattl

Don't disconnect a DB_Error, instead log for better understanding.

parent c423e847
...@@ -758,7 +758,9 @@ class Memcached_DataObject extends Safe_DataObject ...@@ -758,7 +758,9 @@ class Memcached_DataObject extends Safe_DataObject
// we'll need some fancier logic here. // we'll need some fancier logic here.
if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS']) && php_sapi_name() == 'cli') { if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS']) && php_sapi_name() == 'cli') {
foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $index => $conn) { foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $index => $conn) {
if (!empty($conn)) { if ($_PEAR->isError($conn)) {
common_log(LOG_WARNING, __METHOD__ . " cannot disconnect failed DB connection: '".$conn->getMessage()."'.");
} elseif (!empty($conn)) {
$conn->disconnect(); $conn->disconnect();
} }
unset($_DB_DATAOBJECT['CONNECTIONS'][$index]); unset($_DB_DATAOBJECT['CONNECTIONS'][$index]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment