|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-10-29 15:22 UTC] vicentedeteresa at gmail dot com
Description:
------------
doing a foreach with an open array inside, this make a server crash, reporting a Segmentation fault on server log and throwing a fatal error on php-log first.
Server log:
[Wed Oct 29 15:57:46.962708 2014] [core:notice] [pid 1986] AH00052: child pid 5856 exit signal Segmentation fault (11)
PhP log:
[29-Oct-2014 15:57:46 Europe/Berlin] PHP Fatal error: Cannot use [] for reading in /Applications/XAMPP/xamppfiles/htdocs/index/dev_core_cea/core/app/Plugin/Comparador/Controller/ApuestasController.php on line 863
Test script:
---------------
foreach($apostadores[$x]['Apuestas'] as $apuesta){
$apuesta[];
}
Expected result:
----------------
I Spect to see an syntax error
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 05:00:01 2025 UTC |
but you have a syntax error if you want doing a empty array inside foreach you need to do: foreach($apostadores[$x]['Apuestas'] as $apuesta){ $apuesta = array(); }