From: Chuck Hagenbuch Date: Fri, 2 Oct 2009 02:11:37 +0000 (-0400) Subject: Avoid "only variables should be passed by reference" warnings X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=496ac09f81d10c21298f79f6c21b203ee46a4bbe;p=horde.git Avoid "only variables should be passed by reference" warnings --- 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);