|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-23 09:04 UTC] derick@php.net
[2004-04-29 22:55 UTC] sniper@php.net
[2004-04-29 22:56 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ An assignment (of a class variable?) in a switch statement causes an apache crash. The first object instantiation int eh attached sample ($testval == 1) succeeds; the second one ($testval == 2) fails. Reproduce code: --------------- <?php class TestClass { var $type; function TestClass($testval) { $type = intval("2"); if ($testval == 1) { switch($type) { default: echo "Test 1 worked<br>"; flush(); break; } } else if ($testval == 2) { switch($this->type = $type) /* This line causes crash */ { default: echo "Test 2 worked<br>"; flush(); break; } } } } $tc = new TestClass(1); $tc = new TestClass(2); ?> Actual result: -------------- In apache/error.log: [notice] child pid XXXXX exit signal Segmentation fault (11)