php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13464 PHP crashes when string not closed in a switch statement
Submitted: 2001-09-26 21:50 UTC Modified: 2001-09-27 02:48 UTC
From: nayt at internayt dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: Windows 2000 Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nayt at internayt dot com
New email:
PHP Version: OS:

 

 [2001-09-26 21:50 UTC] nayt at internayt dot com
When a string statement is not closed correctly in a case statement, the php engine crashes and causes a windows error. Example of the bad code:

        switch ($oRow["imageAlignment"]) {
            case 1:
                $sOutput = "<br>\n" .
                           "$sImageOutput<br>\n" .
                           "$mainContent<br>\n" .
                           break;
            case 2:
                $sOutput = "<br>\n" .
                           "$mainContent<br>\n" .
                           "$sImageOutput<br>\n";
                           break;
        }

Fixing the case 1 statement to terminate the string will fix the crashing error.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-27 02:48 UTC] mfischer@php.net
Cannot reproduce with 4.0.6 and latest CVS.

- Markus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 08:01:28 2024 UTC