From:  cf@christian-friedl.info ("christianfriedl")
Date:  02 Aug 2017 16:17:40 Hong Kong Time
Newsgroup:  news.php.net/php.pear.bugs
Subject:  

[PEAR-BUG] Bug #17395 [Com]: Fatal Error when trying to run document

NNTP-Posting-Host:  null

Edit report at http://pear.php.net/bugs/bug.php?id=17395&edit=1

 ID:               17395
 Comment by:       christianfriedl
 Reported By:      cf at christian-friedl dot info
 Summary:          Fatal Error when trying to run document
 Status:           Closed
 Type:             Bug
 Package:          PhpDocumentor
 Operating System: Windows 7
 Package Version:  1.4.3
 PHP Version:      5.3.0
 Assigned To:      ashnazg
 New Comment:

I am getting this error too, on a non-CodeIgniter codebase.

I am able to reduce the problem to the following scenario:

* There is a class in a parent namespace
* The is a class in a sub-namespace that extends ANY class in the parent
namespace (regardless of whether the parent class exists or not, and it
doese not have to be the class in the parent namespace)
* The class in the sub-namespace has the same name as the class in the
parent namespace

====================
Example:
======================
A.php
------
createDocs()
/usr/share/pear/PhpDocumentor/phpDocumentor/phpdoc.inc:65
PHP   4. phpDocumentor_IntermediateParser->Output()
/usr/share/pear/PhpDocumentor/phpDocumentor/Setup.inc.php:763
PHP   5. phpDocumentor_IntermediateParser->Convert()
/usr/share/pear/PhpDocumentor/phpDocumentor/IntermediateParser.inc:1867
PHP   6. Converter->walk()
/usr/share/pear/PhpDocumentor/phpDocumentor/IntermediateParser.inc:1654
PHP   7. HTMLframesConverter->formatLeftIndex()
/usr/share/pear/PhpDocumentor/phpDocumentor/Converter.inc:1853
PHP   8. HTMLframesConverter->generateFormattedClassTrees()
/usr/share/pear/PhpDocumentor/phpDocumentor/Converters/HTML/frames/HTMLframesConverter.inc:760
PHP   9. HTMLframesConverter->getRootTree()
/usr/share/pear/PhpDocumentor/phpDocumentor/Converters/HTML/frames/HTMLframesConverter.inc:1222

=============


Previous Comments:
------------------------------------------------------------------------

[2012-10-02 14:56:53] dlgoodchild

I'm using latest CodeIgniter (v.2.1.2) and I'm getting this fatal error
too. I hope any of the following information can help:

Formatting Left Quick Index...
    Writing D:\Workspace\trunk/phpDoc/li_default.html

Fatal error: Call to a member function getImplements() on a non-object
in
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc
on line 1348

Call Stack:
    0.0008     324920   1. {main}()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpdoc:0
    0.0902     336664   2.
include('D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\phpdoc.inc')
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpdoc:59
    0.8426   10508184   3. phpDocumentor_setup->createDocs()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\phpdoc.inc:65
   73.7001  316363968   4. phpDocumentor_IntermediateParser->Output()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\Setup.inc.php:763
   82.6390  318981592   5. phpDocumentor_IntermediateParser->Convert()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\IntermediateParser.inc:1867
   82.6390  318981712   6. Converter->walk()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\IntermediateParser.inc:1654
   94.1846  327302592   7. HTMLframesConverter->formatLeftIndex()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\Converter.inc:1853
   94.3035  328061472   8.
HTMLframesConverter->generateFormattedClassTrees()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:760
   94.3060  328070664   9. HTMLframesConverter->getRootTree()
D:\Applications\xampp_1.7.3\PhpDocumentor-1.4.4\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:1222

------------------------------------------------------------------------

[2012-01-13 02:51:25] ashnazg

Dave, if you are seeing this same fatal on v1.4.4, and have sample code
that triggers the failure, then please add it on open bug #19197 so that
I can take a look... thanks!

------------------------------------------------------------------------

[2011-12-09 00:11:18] davel

Hi, I also get this error in 1.4.4 version: 

Fatal error: Call to a member function getImplements() on a non-object
in
/var/www/svn/trunk/bin/PhpDocumentor/phpDocumentor/Converters/HTML/frames/HTMLframesConverter.inc
on line 1348

Works fine on my Mac:

PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00) 

But not on my debian server:

PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul  1 2011
16:01:01) 

I can send a small zip with 3 PHP scripts that generate the error. They
actually contains two versions of the same class. This is the code I
have inherited :(

------------------------------------------------------------------------

[2011-10-01 00:56:49] ashnazg

-Status: Verified +Status: Closed
Patches for HTML:frames, HTML:Smarty, and PDF converters test fine against PHP 5.3.8, 5.2.17, and 4.4.9. Committed to SVN. ------------------------------------------------------------------------ [2011-09-28 03:56:47] ashnazg
-Roadmap Versions: +Roadmap Versions: 1.4.4
I have a working patch that fixes the issue for the HTML:frames:default converter, across PHP 5.3.8, 5.2.17, and 4.4.9. Need to construct patches for the other converters next. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=17395 -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17395&edit=1