php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9566 error with switch() control structure syntax error reporting
Submitted: 2001-03-05 15:49 UTC Modified: 2001-03-20 21:48 UTC
From: craigp at canada dot com Assigned:
Status: Not a bug Package: Reproducible Crash
PHP Version: 4.0.3pl1 OS: freeBSD
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: craigp at canada dot com
New email:
PHP Version: OS:

 

 [2001-03-05 15:49 UTC] craigp at canada dot com
If there is a syntax error in my switch control structure, my script returns a message pop-up 'The server returned an invalid or unrecognized response.', 
It seems that the syntax of the switch control structure is not checked properly before processing the script. 
this is my invalid switch structure (missing a 'case' statement):
$varX = "a";
switch($varX){
  "a":
    echo("a");
    break;
  case "b":
    echo("b");
    break;
}

check it out!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-16 15:48 UTC] hholzgra@php.net
for me 4.0.4pl1 gives a parse error
on teh '"a:"' line
 [2001-03-20 21:06 UTC] craigp at canada dot com
I'm using 4.0.3 pl1
I guess this was fixed in 4.0.4
My mistake
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 19:01:28 2024 UTC