As per Drupal coding standards there shouldn't be any closing php tag in php files. But in LanguageNegotiatorInterface.php use of "?>" has been done comments. It should be removed as it is in the documentation part and is recommending use of "?>".

CommentFileSizeAuthor
#2 2862273-2.patch385 bytesgaurav.kapoor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaurav.kapoor created an issue. See original summary.

gaurav.kapoor’s picture

Status: Active » Needs review
FileSize
385 bytes
agomezmoron’s picture

Status: Needs review » Reviewed & tested by the community

I checked it and from my side it works

agomezmoron’s picture

agomezmoron’s picture

Issue tags: +DevDaysSeville
Haza’s picture

I performed a quick check, it seems to be the only one left in core.

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Code examples shouldn't have the PHP closing or opening tags in them. If code example has an opening or closing tag, it will cause api.drupal.org have a duplicated PHP opening or closing tag. I checked that this is the only instance that we have in core of both, opening and closing tags.

Committed 2581ebd and pushed to 8.4.x. Thanks!

  • lauriii committed 2581ebd on 8.4.x
    Issue #2862273 by gaurav.kapoor, Haza: Use of ?> in comments in Language...
agomezmoron’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajeevku’s picture

https://www.drupal.org/node/209566 , these guys got a valid point.

Anonymous’s picture

I have been using ?> in all modules, i get error while fixing coding standards but my website is working fine. Is it important to remove ?> ???