Bug #1373: mixed if: endif; /if{} blocks parse error when nested

From: Date: Mon, 03 May 1999 18:22:08 +0000
Subject: Bug #1373: mixed if: endif; /if{} blocks parse error when nested
Groups: php.dev 
Request: Send a blank email to php-dev+get-5351@lists.php.net to get a copy of this message
From: markjr@easydns.com Operating system: Redhat 5.2 PHP version: 3.0 Latest CVS (03/05/1999) PHP Bug Type: Parser error Bug description: mixed if: endif; /if{} blocks parse error when nested (I've commented out the rest of this class and look at it with application/x-httpd-php3-source .phps) This parses fine: if($this->fp = fsockopen($this->SERVER, $this->PORT, &$this->ERRNO, &$this->ERRMSG)): fputs($fp, "GET $this->REQUEST $this->PROTO\n\n"); while(!feof($this->fp)) { $this->result.= fgets($this->fp,128); } # if($this->DEBUG) { echo $this->result; } else: logit( "ERROR: submitting $field[domain] message was: $this->ERRMSG"); endif; Now uncomment the line with if($this->DEBUG), I get a parser error. I've noticed this happened to me on occassion before, but I never got around to paring it down to a few lines to reproduce it. Move that exact uncommented line outside of the nesting if:/endif; block and it also parses fine. In fact, moving it into the else: block and it also parses fine. -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5351) next »