From:             
Operating system: 
PHP version:      5.3.8
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:Only variables should be passed by reference for 
ZEND_SEND_PREFER_REF params

Description:
------------
Built-in functions where a parameter is defined with ZEND_SEND_PREFER_REF
raises a Strict Standards warning if an expression is passed as the
argument.

The PREFER part signals the preference of passing by reference, but if the
argument is not a variable, it should behave as if the parameter was
defined with ZEND_SEND_BY_VAL and keep quiet, just as for regular
ZEND_SEND_BY_VAL parameters.

Test script:
---------------
<?php

error_reporting(32767);

current($arr = array(0 => "a")); /* Strict Standards: ... */ 
current(array(0 => "a"));
current($arr);

?>

Actual result:
--------------
Strict Standards: Only variables should be passed by reference in filename
on line 5

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55754&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55754&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55754&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55754&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55754&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55754&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55754&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55754&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55754&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55754&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55754&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55754&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55754&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55754&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55754&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55754&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55754&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55754&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55754&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55754&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55754&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55754&r=mysqlcfg

Reply via email to