ZF-12279: Dirty code in Zend_Pdf_Parser

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

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

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.