|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-21 19:50 UTC] sc1n at yahoo dot com
[2003-12-22 03:15 UTC] derick@php.net
[2004-01-01 20:48 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 07:00:01 2025 UTC |
Description: ------------ I used a terinary operator to do a continue 0 or continue 2 within a switch, and this caused PHP to seg fault... I am able to consitantly reproduce the bug. Reproduce code: --------------- while( $value_array = each($this->tags) ) { $key = $value_array[0]; $value = $value_array[1]; $value['tag_id'] = $key; switch($tag_pos_type) { case "start": continue $value[3] == 1 ? 2: 0; //The problem case "end": continue $value[3] == 0 ? 2: 0; //The problem } if( is_array($tag_type_array) ) { if( in_array($value[0], $tag_type_array) ) { return $value; } } else { return $value; } } Expected result: ---------------- To either continue not at all, or to continue 2 Actual result: -------------- segmentation fault