WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7524 closed enhancement (invalid)

Missing closing php bracket in wp-admin/js/revisions-js.php

Reported by: webrocker Owned by:
Milestone: Priority: low
Severity: minor Version:
Component: General Keywords:
Focuses: Cc:

Description

Not sure if this is intentional or not, but in the
revisions-js.php there is no closing/ending "?>" bracket in the last line.

Attachments (1)

7524.diff (365 bytes) - added by scohoust 6 years ago.
Adds in php closing tag

Download all attachments as: .zip

Change History (9)

scohoust6 years ago

Adds in php closing tag

comment:1 santosj6 years ago

  • Resolution set to invalid
  • Status changed from new to closed

There are several files already where the lack of a closing tag is intentional.

comment:2 santosj6 years ago

  • Milestone 2.7 deleted

comment:3 webrocker6 years ago

I thought as much, but under what circumstances does this (leaving out the closing tag) make sense? this is the first time I come across this issue. I always thought a (inlcude) or whatever-php-file needs to be proper closed...? thanks for enlightment,
Tom

comment:4 Viper007Bond6 years ago

IMO it should be in every single file except maybe wp-config.php. I think this ticket is valid.

comment:5 follow-ups: jacobsantos6 years ago

BackPress doesn't have the closing PHP tag.

@Tom The closing PHP tag is optional, as long as there isn't any non-PHP code after.

comment:6 in reply to: ↑ 5 ; follow-up: Viper007Bond6 years ago

Replying to jacobsantos:

BackPress doesn't have the closing PHP tag.

Then it should. I believe we all had this discussion before and it was decided it was best to have one. Besides being "proper", it's a helpful way for users to make sure a file was completely uploaded. There's also zero reason whatsoever to not have one.

comment:7 in reply to: ↑ 6 Viper007Bond6 years ago

Replying to Viper007Bond:

There's also zero reason whatsoever to not have one.

(I'm of course excluding user edited files.)

comment:8 in reply to: ↑ 5 webrocker6 years ago

Replying to jacobsantos:

@Tom The closing PHP tag is optional, as long as there isn't any non-PHP code after.

Thanks for the info, I didn't know that.

Replying to Viper007Bond:

it's a helpful way for users to make sure a file was completely uploaded

I second that, still. :-)

Note: See TracTickets for help on using tickets.