FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=14472&edit=1

ID: 14472
Updated by: demon.gene@gmail.com
Reported By: indigo at crindigo dot com
Summary: Incorrect line numbers with heredoc
-Status: Open
+Status: Verified
Type: Bug
Package: PhpDocumentor
Operating System: Ubuntu Linux (x86)
Package Version: 1.4.2
PHP Version: 5.2.6
Roadmap Versions:
New Comment:

-Status: Open
+Status: Verified
Confirmed this issue exists in v1.4.2 and current SVN, on PHP 5.2.6 and
5.2.10.

Test script:
<?php
/**
* @package bug-14472
* @filesource
*/

/**
* function #1
*/
function func1() {
return 'func1';
}

/**
* a heredoc
* @var string
*/
$heredoc = <<<ENDOFHEREDOC
one
two
three
ENDOFHEREDOC;

/**
* function #2
*/
function func2() {
return 'func2';
}
?>


Previous Comments:
------------------------------------------------------------------------

[2009-07-21 17:35:09] ashnazg

-Roadmap Versions:
+Roadmap Versions: 1.4.3


------------------------------------------------------------------------

[2008-08-07 20:13:18] indigo

Description:
------------
When viewing a procedural page, includes/functions (and I presume other
things), are off by one line, after a heredoc is encountered in the
file. I'm guessing the lines would be off in other pages, but I haven't
tested them. PHP's tokenizer appears to put a newline in the
T_START_HEREDOC token, so adding that to
phpDocumentorTWordParser::$_nl_check seems to fix it. Not sure if
something else needs to be changed in another location, or if that's
enough.

------------------------------------------------------------------------

Search Discussions

  • Demon Gene at Aug 30, 2009 at 5:55 am
    Edit report at http://pear.php.net/bugs/bug.php?id=14472&edit=1

    ID: 14472
    Updated by: demon.gene@gmail.com
    Reported By: indigo at crindigo dot com
    Summary: Incorrect line numbers with heredoc
    -Status: Verified
    +Status: Assigned
    Type: Bug
    Package: PhpDocumentor
    Operating System: Ubuntu Linux (x86)
    Package Version: 1.4.2
    PHP Version: 5.2.6
    -Assigned To:
    +Assigned To: ashnazg
    Roadmap Versions:
    New Comment:

    -Status: Verified
    +Status: Assigned
    -Assigned To:
    +Assigned To: ashnazg



    Previous Comments:
    ------------------------------------------------------------------------

    [2009-08-30 07:54:56] ashnazg

    -Status: Open
    +Status: Verified
    Confirmed this issue exists in v1.4.2 and current SVN, on PHP 5.2.6 and
    5.2.10.

    Test script:
    <?php
    /**
    * @package bug-14472
    * @filesource
    */

    /**
    * function #1
    */
    function func1() {
    return 'func1';
    }

    /**
    * a heredoc
    * @var string
    */
    $heredoc = <<<ENDOFHEREDOC
    one
    two
    three
    ENDOFHEREDOC;

    /**
    * function #2
    */
    function func2() {
    return 'func2';
    }
    ?>

    ------------------------------------------------------------------------

    [2009-07-21 17:35:09] ashnazg

    -Roadmap Versions:
    +Roadmap Versions: 1.4.3


    ------------------------------------------------------------------------

    [2008-08-07 20:13:18] indigo

    Description:
    ------------
    When viewing a procedural page, includes/functions (and I presume other
    things), are off by one line, after a heredoc is encountered in the
    file. I'm guessing the lines would be off in other pages, but I haven't
    tested them. PHP's tokenizer appears to put a newline in the
    T_START_HEREDOC token, so adding that to
    phpDocumentorTWordParser::$_nl_check seems to fix it. Not sure if
    something else needs to be changed in another location, or if that's
    enough.

    ------------------------------------------------------------------------
  • Demon Gene at Aug 30, 2009 at 6:12 am
    Edit report at http://pear.php.net/bugs/bug.php?id=14472&edit=1

    ID: 14472
    Updated by: demon.gene@gmail.com
    Reported By: indigo at crindigo dot com
    Summary: Incorrect line numbers with heredoc
    -Status: Assigned
    +Status: Closed
    Type: Bug
    Package: PhpDocumentor
    Operating System: Ubuntu Linux (x86)
    Package Version: 1.4.2
    PHP Version: 5.2.6
    Assigned To: ashnazg
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Closed
    Adding T_START_HEREDOC to $_nl_check does indeed make my test file
    work. Thanks for the observation, Steven.

    Fix committed to SVN.


    Previous Comments:
    ------------------------------------------------------------------------

    [2009-08-30 07:55:14] ashnazg

    -Status: Verified
    +Status: Assigned
    -Assigned To:
    +Assigned To: ashnazg


    ------------------------------------------------------------------------

    [2009-08-30 07:54:56] ashnazg

    -Status: Open
    +Status: Verified
    Confirmed this issue exists in v1.4.2 and current SVN, on PHP 5.2.6 and
    5.2.10.

    Test script:
    <?php
    /**
    * @package bug-14472
    * @filesource
    */

    /**
    * function #1
    */
    function func1() {
    return 'func1';
    }

    /**
    * a heredoc
    * @var string
    */
    $heredoc = <<<ENDOFHEREDOC
    one
    two
    three
    ENDOFHEREDOC;

    /**
    * function #2
    */
    function func2() {
    return 'func2';
    }
    ?>

    ------------------------------------------------------------------------

    [2009-07-21 17:35:09] ashnazg

    -Roadmap Versions:
    +Roadmap Versions: 1.4.3


    ------------------------------------------------------------------------

    [2008-08-07 20:13:18] indigo

    Description:
    ------------
    When viewing a procedural page, includes/functions (and I presume other
    things), are off by one line, after a heredoc is encountered in the
    file. I'm guessing the lines would be off in other pages, but I haven't
    tested them. PHP's tokenizer appears to put a newline in the
    T_START_HEREDOC token, so adding that to
    phpDocumentorTWordParser::$_nl_check seems to fix it. Not sure if
    something else needs to be changed in another location, or if that's
    enough.

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 30, '09 at 5:55a
activeAug 30, '09 at 6:12a
posts3
users1
websitepear.php.net

1 user in discussion

Demon Gene: 3 posts

People

Translate

site design / logo © 2022 Grokbase