From:             cavensben at gmail dot com
Operating system: windows vista
PHP version:      5.4.19
Package:          Apache related
Bug Type:         Bug
Bug description:function return in write mode fails to throw error within 
foreach loop

Description:
------------
PHP version 5.3.8

When a function return is in write mode inside a foreach loop, no exception
is 
thrown. Fatal exception 'Can't use function return value in write context'

should be thrown but instead, Apache crashes with following error details 
(dutch): 

Gebeurtenisnaam van probleem:   APPCRASH
  Naam van de toepassing:       httpd.exe
  Versie van toepassing:        2.2.21.0
  Tijdstempel van toepassing:   4e6b3136
  Naam van foutmodule:          php5ts.dll
  Versie van foutmodule:        5.3.8.0
  Tijdstempel van foutmodule:   4e537a04
  Uitzonderingscode:            c0000005
  Uitzonderingsmarge:           0003c45d
  Versie van besturingssysteem: 6.0.6002.2.2.0.256.6
  Landinstelling-id:            2067
  Aanvullende informatie 1:     f1e8
  Aanvullende informatie 2:     d4eb7cf28a4f910486e91a11f70d294f
  Aanvullende informatie 3:     9e36
  Aanvullende informatie 4:     0fa4d7271c395f5ea87ec2c924074b62


Test script:
---------------
foreach($values as $value)
{
    if(!empty(trim($value))){ $result = $value;}
}

Expected result:
----------------
Fatal exception: Can't use function return value in write context

Actual result:
--------------
Apache crashes

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

Reply via email to