bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62158] PHP indented heredoc ending marker are not handled correctl


From: Cédric Anne
Subject: [bug #62158] PHP indented heredoc ending marker are not handled correctly
Date: Wed, 9 Mar 2022 04:27:22 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?62158>

                 Summary: PHP indented heredoc ending marker are not handled
correctly
                 Project: GNU gettext
            Submitted by: canne
            Submitted on: mer. 09 mars 2022 09:27:19 UTC
                Category: PHP
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

When PHP code contains heredoc ending markers that are indented (available
since PHP 7.3), it seems that it is not detected. Result is that strings
located in following code source are not extracted.

See in joined file (test.php).
- The heredoc block that starts on line 6 should end on line 8, but its ending
marker is indented and not detected.
- String on line 11 is ignored, as considered in a heredoc block.
- The heredoc ending marker on line 16 is taken for ending marker of previous
heredoc block, as it has the same name.
- The heredoc block that starts on line 22 should end on line 24, but its
ending marker is indented and not detected.
- String on line 27 is ignored, as considered in a heredoc block.
- The heredoc ending marker on line 32 has no effect, as it has a different
name than previous heredoc block.

Attached test.po file was generated using following command line: 
xgettext test.php -L PHP --force-po --keyword=_:1 -o test.po



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: mer. 09 mars 2022 09:27:19 UTC  Name: test.php  Size: 391o   By: canne

<http://savannah.gnu.org/bugs/download.php?file_id=52973>
-------------------------------------------------------
Date: mer. 09 mars 2022 09:27:19 UTC  Name: test.po  Size: 663o   By: canne

<http://savannah.gnu.org/bugs/download.php?file_id=52974>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62158>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]