Issues

ZF-12279: Dirty code in Zend_Pdf_Parser

Issue Type: Task Created: 2012-06-12T08:19:16.000+0000 Last Updated: 2012-06-13T11:22:58.000+0000 Status: Open Fix version(s): Reporter: Sergey Kolodyazhnyy (sergeykolodyazhnyy) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Pdf

Related issues: Attachments:

Description

Replace

   // Force $objectOffset to be treated as decimal instead of octal number
   for ($numStart = 0; $numStart < strlen($objectOffset)-1; $numStart++) {
        if ($objectOffset[$numStart] != '0') {
             break;
        }
   }
   $objectOffset = substr($objectOffset, $numStart);

With

   $objectOffset = ltrim($objectOffset, '0');

Comments

Posted by Sergey Kolodyazhnyy (sergeykolodyazhnyy) on 2012-06-12T08:24:42.000+0000

There a lot of this code entries in Zend_Pdf_Parser, even not as separate method

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2012-06-13T11:22:58.000+0000

Sergey,

Thank you for reporting this issue. Could you perhaps supply a patch that contains the improvements you think can be made? Also, I'm not sure what the incentive was to do it like this. Please make sure you run the test suite to ensure we don't break anything here ;)

Thanks.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts