Menu

#53 else/ elseif without curly braces

Fixed
nobody
None
Medium
Defect
2013-08-05
2013-08-03
Anonymous
No

Originally created by: maximili...@googlemail.com

What steps will reproduce the problem?
this is a valid if statement:
if (time() == 4)
    echo "test";
else
    echo "hallo";

But phpcheckstyle flags the line with the warning: "The block closure '}' must be on else". Thats a false positiv warning, because there is no curly brace.

What version of the product are you using? On what operating system?
Version: PHPCheckStyle-0.12.1
OS: Debian Linux 5.0.10
PHP Version: 5.4.8

I attached a patchfile which correct the errors. Hope this helps.

1 Attachments

Related

Wiki: History

Discussion

  • Anonymous

    Anonymous - 2013-08-04

    Originally posted by: tch...@hotmail.com

    Cool, a patch, thanks ^^

    Status: Accepted

     
  • Anonymous

    Anonymous - 2013-08-05

    Originally posted by: tch...@hotmail.com

    (No comment was entered for this change.)

    Status: Fixed

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.