@@ -829,12 +829,12 @@ public function __call($name, $args)
829829 }
830830 break ;
831831 case 'scan ' :
832- $ ref =& $ args [0 ];
833- if (empty ($ ref ))
832+ $ trackedArgs = array (& $ args [0 ]) ;
833+ if (empty ($ trackedArgs [ 0 ] ))
834834 {
835- $ ref = 0 ;
835+ $ trackedArgs [ 0 ] = 0 ;
836836 }
837- $ eArgs = array ($ ref );
837+ $ eArgs = array ($ trackedArgs [ 0 ] );
838838 if (!empty ($ args [1 ]))
839839 {
840840 $ eArgs [] = 'MATCH ' ;
@@ -850,12 +850,12 @@ public function __call($name, $args)
850850 case 'sscan ' :
851851 case 'zscan ' :
852852 case 'hscan ' :
853- $ ref =& $ args [1 ];
854- if (empty ($ ref ))
853+ $ trackedArgs = array (& $ args [1 ]) ;
854+ if (empty ($ trackedArgs [ 0 ] ))
855855 {
856- $ ref = 0 ;
856+ $ trackedArgs [ 0 ] = 0 ;
857857 }
858- $ eArgs = array ($ args [0 ],$ ref );
858+ $ eArgs = array ($ args [0 ],$ trackedArgs [ 0 ] );
859859 if (!empty ($ args [2 ]))
860860 {
861861 $ eArgs [] = 'MATCH ' ;
@@ -1300,7 +1300,7 @@ protected function read_reply($name = '', $returnQueued = false)
13001300 return $ response ;
13011301 }
13021302
1303- protected function decode_reply ($ name , $ response , array $ arguments = array () )
1303+ protected function decode_reply ($ name , $ response , array & $ arguments = array () )
13041304 {
13051305 // Smooth over differences between phpredis and standalone response
13061306 switch ($ name )
@@ -1351,12 +1351,12 @@ protected function decode_reply($name, $response, array $arguments = array() )
13511351
13521352 case 'scan ' :
13531353 case 'sscan ' :
1354- $ ref = array_shift ($ response );
1354+ $ arguments [ 0 ] = intval ( array_shift ($ response) );
13551355 $ response = empty ($ response [0 ]) ? array () : $ response [0 ];
13561356 break ;
13571357 case 'hscan ' :
13581358 case 'zscan ' :
1359- $ ref = array_shift ($ response );
1359+ $ arguments [ 0 ] = intval ( array_shift ($ response) );
13601360 $ response = empty ($ response [0 ]) ? array () : $ response [0 ];
13611361 if (!empty ($ response ) && is_array ($ response ))
13621362 {
0 commit comments