From 496ac09f81d10c21298f79f6c21b203ee46a4bbe Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 1 Oct 2009 22:11:37 -0400 Subject: [PATCH] Avoid "only variables should be passed by reference" warnings --- framework/Support/test/Horde/Support/ConsistentHashTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Support/test/Horde/Support/ConsistentHashTest.php b/framework/Support/test/Horde/Support/ConsistentHashTest.php index fc0209353..24e4e981b 100644 --- a/framework/Support/test/Horde/Support/ConsistentHashTest.php +++ b/framework/Support/test/Horde/Support/ConsistentHashTest.php @@ -183,7 +183,8 @@ class Horde_Support_ConsistentHashTest extends PHPUnit_Framework_TestCase // Remove the fixed test value. $nodes = array_values($nodes); $testindex = array_search('key', $nodes); - $testvalue = array_shift(array_splice($nodes, $testindex, 1)); + $tmp = array_splice($nodes, $testindex, 1); + $testvalue = array_shift($tmp); foreach ($nodes as $node) { $h->add($node); @@ -216,7 +217,8 @@ class Horde_Support_ConsistentHashTest extends PHPUnit_Framework_TestCase // Remove the fixed test value. $nodes = array_values($nodes); $testindex = array_search('key', $nodes); - $testvalue = array_shift(array_splice($nodes, $testindex, 1)); + $tmp = array_splice($nodes, $testindex, 1); + $testvalue = array_shift($tmp); foreach ($nodes as $node) { $h->add($node); -- 2.11.0