ZF-7176: Zend PDF loads Zend_Memory_Container_Locked Object into Properties Array - which may cause fatal error


I have at least one PDF where when loaded by Zend_PDF, Zend_Memory_Container_Locked objects are pulled into the Document Type Dictionary properties array.

Array ( ... [SaveStreams] => Array ( [Q] => Zend_Memory_Container_Locked Object ( [value] => Q )

        [q] => Zend_Memory_Container_Locked Object
                [value] =>  q 


[Changes] => Array
        [0] => Array
                [Creator] => SPDF
                [Producer] => SPDF
                [ModDate] => D:20060401000353-05'00'
                [CreationDate] => D:20060401000353-05'00'

        [1] => Array
                [Version] => 3.0, SPDF Build Number 1085 for Linux 7, Application Build Date: May 15 2003
                [ModDate] => D:20060401050353-00'00'
                [Product] => AppendPro
                [Vendor] => Appligent


... )

If you then modify the properties array, saving crashes with a fatal error.


Code sufficient to reproduce the error

PDF through which this bug is reproducible. It does have an atypical properties structure.

metadata output from adobe acrobat - may not be useful.

Interestingly, Adobe Acrobat ignores the array(s). This also may not be useful.

A work-around for this issue is to wipe the metadata and start over from scratch.

This is still a problem in 1.10.3

error message: PHP Catchable fatal error: Object of class Zend_Memory_Container_Locked could not be converted to string in /www/ZendFramework/library/Zend/Pdf/Element.php on line 155