Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#15965 closed defect (bug) (worksforme)

Streamline exit call syntax

Reported by: hakre's profile hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

After review of patches in #15518 it came to my attention that exit is sometimes called with and sometime w/o paranthesis.

As #15518 makes use of the exit; variant, all occurences of exit(); can be replaced with it.

Attachments (1)

15965.patch (17.0 KB) - added by hakre 14 years ago.

Download all attachments as: .zip

Change History (5)

@hakre
14 years ago

#1 @hakre
14 years ago

break; after exit; is useless, let me know if that can be removed or should be still in because of code consistency (e.g. switch cases code formatting always ending in break).

#2 @westi
14 years ago

  • Milestone changed from Awaiting Review to Future Release

break;'s should stay.

I think I slightly prefer exit() over exit.

Whatever - Future Release.

#3 @filosofo
14 years ago

I think it's a good idea to remove the parentheses on language constructs like this and include_once, so as to remind folks that they're not truly functions and will behave somewhat differently.

And the parentheses take up unnecessary file size. :-)

#4 @nacin
11 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Feel free to reopen with a non-stale patch that doesn't touch breaks and I'll commit it.

Note: See TracTickets for help on using tickets.