Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.1
-
None
-
Operating System: Linux
PHP Version: (please be specific, like '4.4.3' or '5.1.5') 5.2.7
Database and version: Mysql 5.0.67-0.dotdeb.1
Browser (and version): Firefox 3.0.4
Description
ezdefaultvathandler raise some PHP5 strict issues
Only variables should be passed by reference in /.../kernel/classes/vathandlers/ezdefaultvathandler.php on line 199
Steps to reproduce
Setup a shop that use the ezdefaultvathandler
Setup debugs and see the following message:
Dec 08 2008 15:18:38 ] [192.168.0.119] PHP:
Only variables should be passed by reference in /home/syg/ez/syg_test/kernel/classes/vathandlers/ezdefaultvathandler.php on line 199
in strict.log
My fix patch is pretty trivial
Index: kernel/classes/vathandlers/ezdefaultvathandler.php
===================================================================
— kernel/classes/vathandlers/ezdefaultvathandler.php (revision 7189)
+++ kernel/classes/vathandlers/ezdefaultvathandler.php (working copy)
@@ -196,7 +196,9 @@
$bestPriority = 0;
if ( $vatPriorities )
- $bestPriority = array_shift( array_keys( $vatPriorities ) );
+ //$bestPriority = array_shift( array_keys( $vatPriorities ) );
+ $tmpKeys = array_keys( $vatPriorities );
+ $bestPriority = array_shift( $sgTmpKeys );
if ( $bestPriority == 0 )
{