Zend Framework 0.2.0 - Zend_PDF Flawed?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
DaveTheAve
Forum Contributor
Posts: 385
Joined: Tue Oct 03, 2006 2:25 pm
Location: 127.0.0.1
Contact:

Zend Framework 0.2.0 - Zend_PDF Flawed?

Post 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?
Last edited by DaveTheAve on Sat Dec 02, 2006 4:44 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
DaveTheAve
Forum Contributor
Posts: 385
Joined: Tue Oct 03, 2006 2:25 pm
Location: 127.0.0.1
Contact:

Post 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.
Post Reply