Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12454 closed enhancement (invalid)

Should the code editor show leading <?php and trailing ?> tags?

Reported by: ribbontree's profile Ribbontree Owned by: janeforshort's profile janeforshort
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: UI Keywords: close
Focuses: Cc:

Description (last modified by Denis-de-Bernardy)

Re-opened to discuss the UI issue in the code editor. Was:


When WP lacks permission to generate wp-config.php during install, the textarea does not display the closing tag (?>) for a PHP file, despite the opening tag (<?php) appearing at the top.

I do not know what will happen if one does not manually add the closing tag. I suspect a PHP error will occur, but I did not test that.
This was tested with the nightly build, downloaded 14 hours ago.

Change History (6)

#1 in reply to: ↑ description @filosofo
15 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

Replying to Ribbontree:

I do not know what will happen if one does not manually add the closing tag. I suspect a PHP error will occur, but I did not test that.
This was tested with the nightly build, downloaded 14 hours ago.

Closing PHP tags are optional.

Duplicate of #10106

#2 @Denis-de-Bernardy
15 years ago

  • Description modified (diff)
  • Milestone set to Future Release
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Summary changed from wp-config lacks closing php tag ?> to The code editor should not show leading <?php and trailing ?> tags
  • Type changed from defect (bug) to enhancement

Re-opening this for the twist in the ticket's description...

#3 @Denis-de-Bernardy
15 years ago

  • Component changed from General to UI
  • Owner set to janeforshort
  • Status changed from reopened to assigned

#4 @Denis-de-Bernardy
15 years ago

  • Summary changed from The code editor should not show leading <?php and trailing ?> tags to Should the code editor show leading <?php and trailing ?> tags?

#5 @scribu
15 years ago

  • Keywords close added

I think having the closing tag will cause more problems than it fixes:

if you accidentally add whitespace after that tag, you will get an error each time WP tries to do a redirect.

#6 @Denis-de-Bernardy
15 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from assigned to closed

fair enough. just wanted to ask.

Note: See TracTickets for help on using tickets.