WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 months ago

#15965 closed defect (bug) (worksforme)

Streamline exit call syntax

Reported by: 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 3 years ago.

Download all attachments as: .zip

Change History (5)

hakre3 years ago

comment:1 hakre3 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).

comment:2 westi3 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.

comment:3 filosofo3 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. :-)

comment:4 nacin3 months 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.