Skip to content

Commit

Permalink
MDL-46796 caching: Fix missing property error for memcache(d)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmerrill committed Aug 13, 2014
1 parent 14cb870 commit e75becf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions cache/stores/memcache/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,24 +435,24 @@ public static function config_get_configuration_array($data) {
}

$clustered = false;
$setservers = array();
if (isset($data->clustered)) {
$clustered = true;
}

$lines = explode("\n", $data->setservers);
$setservers = array();
foreach ($lines as $line) {
// Trim surrounding colons and default whitespace.
$line = trim(trim($line), ":");
if ($line === '') {
continue;
}
$setserver = explode(':', $line, 3);
// We don't use weights, so display a debug message.
if (count($setserver) > 2) {
debugging('Memcache Set Server '.$setserver[0].' has too many parameters.');
$lines = explode("\n", $data->setservers);
foreach ($lines as $line) {
// Trim surrounding colons and default whitespace.
$line = trim(trim($line), ":");
if ($line === '') {
continue;
}
$setserver = explode(':', $line, 3);
// We don't use weights, so display a debug message.
if (count($setserver) > 2) {
debugging('Memcache Set Server '.$setserver[0].' has too many parameters.');
}
$setservers[] = $setserver;
}
$setservers[] = $setserver;
}

return array(
Expand Down
28 changes: 14 additions & 14 deletions cache/stores/memcached/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,24 +491,24 @@ public static function config_get_configuration_array($data) {
}

$clustered = false;
$setservers = array();
if (isset($data->clustered)) {
$clustered = true;
}

$lines = explode("\n", $data->setservers);
$setservers = array();
foreach ($lines as $line) {
// Trim surrounding colons and default whitespace.
$line = trim(trim($line), ":");
if ($line === '') {
continue;
}
$setserver = explode(':', $line, 3);
// We don't use weights, so display a debug message.
if (count($setserver) > 2) {
debugging('Memcached Set Server '.$setserver[0].' has too many parameters.');
$lines = explode("\n", $data->setservers);
foreach ($lines as $line) {
// Trim surrounding colons and default whitespace.
$line = trim(trim($line), ":");
if ($line === '') {
continue;
}
$setserver = explode(':', $line, 3);
// We don't use weights, so display a debug message.
if (count($setserver) > 2) {
debugging('Memcached Set Server '.$setserver[0].' has too many parameters.');
}
$setservers[] = $setserver;
}
$setservers[] = $setserver;
}

return array(
Expand Down

0 comments on commit e75becf

Please sign in to comment.