Page 1 of 1

Zend Framework 0.2.0 - Zend_PDF Flawed?

Posted: Sat Dec 02, 2006 11:16 am
by DaveTheAve
Fatal error: Nesting level too deep - recursive dependency? in W:\www\framework\libs\ZendFramework\library\Zend\Pdf\ElementFactory.php on line 262
That was the error I was getting trying to create a PDF file using the "Understanding the Zend Framework" tutorial series (With some serious improvements and patching to work with a newer framework version)

I googled the error and found a solution for a general PHP error.

Thus using that information I patched the Zend_PDF_ElementFactory file on line 262 to read:

Code: Select all

if ($obj->getFactory() !== $this) {
instead of:

Code: Select all

if ($obj->getFactory() != $this) {
and the error seems to disappear.

What do you think, is it a bug that needs to be fixed?

Posted: Sat Dec 02, 2006 2:11 pm
by feyd
Identity checks are used in later versions of PHP to determine if a two references (or objects) are the same (exact) object... so it may be if that's what it's supposed to be doing.

Posted: Sat Dec 02, 2006 2:23 pm
by DaveTheAve
All i know is that it works perfectly only with this patch. All my pdf files are being generated fine; well, at least like their suppose to be with the code.