Req #19313 [Opn]: Make getTokensAsString() more robust by detecting incorrect length value
| From: | gsherwood at squiz dot net | Date: | Mon, 05 Mar 2012 01:14:42 +0000 |
| Subject: | Req #19313 [Opn]: Make getTokensAsString() more robust by detecting incorrect length value | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8357@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19313&edit=1
ID: 19313
Updated by: gsherwood@squiz.net
Reported By: klaus dot purer at gmail dot com
-Summary: Make PHP_CodeSniffer_File::getTokensAsString() more
robust
+Summary: Make getTokensAsString() more robust by detecting
incorrect length value
Status: Open
Type: Feature/Change Request
Package: PHP_CodeSniffer
Package Version: SVN
PHP Version: Irrelevant
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:
-Summary: Make
PHP_CodeSniffer_File::getTokensAsString() more robust
+Summary: Make getTokensAsString() more robust by
detecting incorrect length value
-Assigned To:
+Assigned To: squiz
Previous Comments:
------------------------------------------------------------------------
[2012-03-02 01:37:51] klausi
Added #patch
bug:19313;patch:phpcs-tokens-as-string.patch;revision:1330652271;.
------------------------------------------------------------------------
[2012-03-02 01:37:27] klausi
Description:
------------
If the length passed to the getTokensAsString() method exceeds the
number of tokens in the file PHP notices will occur.
For convenience this method should be more robust and stop assembling
the string if the last token has been reached. Otherwise I always have
to make sure myself that the limit is not exceeded before calling. Which
is tedious.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19313&edit=1