Browse Source

Fix incorrect type on persistent connection.

Mark Story 5 years ago
parent
commit
055f945819

+ 3 - 3
src/Cache/Engine/MemcachedEngine.php

@@ -157,9 +157,9 @@ class MemcachedEngine extends CacheEngine
                 $configuredServers = $this->_config['servers'];
                 sort($configuredServers);
                 if ($actualServers !== $configuredServers) {
-                    $message = "Invalid cache configuration. Multiple persistent cache configurations are detected" .
-                        " with different 'servers' values. 'servers' values for persistent cache configurations" .
-                        " must be the same when using the same persistence id.";
+                    $message = 'Invalid cache configuration. Multiple persistent cache configurations are detected' .
+                        ' with different `servers` values. `servers` values for persistent cache configurations' .
+                        ' must be the same when using the same persistence id.';
                     throw new InvalidArgumentException($message);
                 }
             }

+ 2 - 2
tests/TestCase/Cache/Engine/MemcachedEngineTest.php

@@ -387,7 +387,7 @@ class MemcachedEngineTest extends TestCase
         $config1 = [
             'className' => 'Memcached',
             'servers' => ['127.0.0.1:11211'],
-            'persistent' => true,
+            'persistent' => '123',
         ];
         $Memcached1->init($config1);
 
@@ -395,7 +395,7 @@ class MemcachedEngineTest extends TestCase
         $config2 = [
             'className' => 'Memcached',
             'servers' => ['127.0.0.1:11212'],
-            'persistent' => true,
+            'persistent' => '123',
         ];
         $Memcached2->init($config2);
     }