#150: Source is messed up in some case and not analzyed
Issue attachments
Issue revisions
- new by Jürgen Henge-Ernst at 2010-M-06 11:00
- new by Jürgen Henge-Ernst at 2010-M-06 11:00
- assigned by Manuel Pichler at 2010-M-06 12:51
- assigned by Manuel Pichler at 2010-M-06 13:10
- assigned by Manuel Pichler at 2010-M-07 15:38
- closed by Manuel Pichler at 2010-M-07 15:39
| Type | |
|---|---|
| State | |
| Priority | |
| Resolution | |
| Assigned to | Manuel Pichler |
| Scheduled for | 0.9.13 |
| Affected versions | 0.9.12 |
| Affected components | Tokenizer |
| Last change | Friday 7 May 2010 15:39:20 UTC by Manuel Pichler |
Short description
Analyzing the attached file is not possible and internal the php source code analyzed is messed up due the php-shorttag handling which removes some chars. I suspect the regexp (<<<(s*)["']([^"']+)["']) that messes up with my code.
Steps to reproduce
phpmd x.php xml unusedcode
Expected behavior
<?xml version="1.0" encoding="UTF-8" ?> <pmd version="0.2.5" timestamp="2010-05-06T12:59:31+02:00"> </pmd>
Actual behavior
Unexpected character in input: ''' (ASCII=39) state=1
Jürgen Henge-Ernst at Thursday 6 May 2010 11:14:39 UTC
Changing the regex in PHP/Depend/Tokenizer/Internal.php to: (<<<(s*)["']([^"'n]+)["']) seems to fix the issue
Manuel Pichler at Thursday 6 May 2010 13:10:46 UTC
Scheduled for release 0.9.13
Jürgen Henge-Ernst at Thursday 6 May 2010 21:40:45 UTC
Manuel Pichler at Friday 7 May 2010 12:20:51 UTC
Hi Jürgen,
thanks for reporting this issue and providing the patch. I will fix this asap.
Manuel Pichler at Friday 7 May 2010 15:38:12 UTC
Fixed in svn revision #1266
Manuel Pichler at Friday 7 May 2010 15:39:20 UTC
Forgot to change the ticket status. Fixed in svn revision #1266