Bug #68323 [Opn->Fbk]: Array makes server crash

From: Date: Wed, 03 Feb 2021 12:13:07 +0000
Subject: Bug #68323 [Opn->Fbk]: Array makes server crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231909@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68323&edit=1

 ID:                 68323
 Updated by:         cmb@php.net
 Reported by:        vicentedeteresa at gmail dot com
 Summary:            Array makes server crash
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            *General Issues
 Operating System:   MacOs
 PHP Version:        5.4.34
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Is this still an issue with any of the actively supported PHP
versions[1]?  If so, please provide a stack backtrace[2].

[1] <https://www.php.net/supported-versions.php>
[2] <https://bugs.php.net/bugs-generating-backtrace.php>


Previous Comments:
------------------------------------------------------------------------
[2014-10-29 17:27:40] edgar dot r dot sandi at gmail dot com

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();
}

------------------------------------------------------------------------
[2014-10-29 15:22:37] 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



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68323&edit=1


Thread (4 messages)

« previous php.bugs (#231909) next »