git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit f54584c1 authored by mmn's avatar mmn

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

parent c423e847
......@@ -758,7 +758,9 @@ class Memcached_DataObject extends Safe_DataObject
// we'll need some fancier logic here.
if (!$exists && !empty($_DB_DATAOBJECT['CONNECTIONS']) && php_sapi_name() == 'cli') {
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();
}
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