Bug #65618 [Fbk->NoF]: function return in write mode fails to throw error within foreach loop
| From: | php-bugs at lists dot php dot net | Date: | Tue, 15 Oct 2013 11:54:49 +0000 |
| Subject: | Bug #65618 [Fbk->NoF]: function return in write mode fails to throw error within foreach loop | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182264@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65618&edit=1
ID: 65618
Updated by: php-bugs@lists.php.net
Reported by: cavensben at gmail dot com
Summary: function return in write mode fails to throw error
within foreach loop
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Reproducible crash
Operating System: windows vista
PHP Version: 5.4.19
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2013-09-04 20:38:00] aharvey@php.net
I can't reproduce this. Does this still happen on a current 5.4 build? (You can
get a snapshot at http://windows.php.net/snapshots/.) If so, could you
please try
to get a backtrace using the instructions at http://bugs.php.net/bugs-generating-
backtrace-win32.php?
The empty() changes in PHP 5.5 mean that this is likely to just work regardless
(without the error) in 5.5 onwards, so the only branch that's still fully
supported that's likely to be affected is 5.4.
------------------------------------------------------------------------
[2013-09-04 19:49:01] cavensben at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=65618&edit=1