Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 "?>".
Comment | File | Size | Author |
---|---|---|---|
#2 | 2862273-2.patch | 385 bytes | gaurav.kapoor |
Comments
Comment #2
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commentedComment #3
agomezmoron CreditAttribution: agomezmoron at La Drupalera by Emergya commentedI checked it and from my side it works
Comment #4
agomezmoron CreditAttribution: agomezmoron at La Drupalera by Emergya commentedComment #5
agomezmoron CreditAttribution: agomezmoron at La Drupalera by Emergya commentedComment #6
HazaI performed a quick check, it seems to be the only one left in core.
Comment #7
lauriiiCode 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!
Comment #9
agomezmoron CreditAttribution: agomezmoron at La Drupalera by Emergya commentedComment #11
rajeevku CreditAttribution: rajeevku commentedhttps://www.drupal.org/node/209566 , these guys got a valid point.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedI have been using ?> in all modules, i get error while fixing coding standards but my website is working fine. Is it important to remove ?> ???