Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #5371 Getting several "PHP Fatal error: Only variables can be passed by reference"
Submitted: 2005-09-12 15:47 UTC
From: drewish Assigned: drewish
Status: Closed Package: PhpDocumentor
PHP Version: 5.0.5 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2005-09-12 15:47 UTC] drewish
Description: ------------ After upgrading to PHP 5.0.5 PHPDocumentor stopped working. Fatal error: Only variables can be passed by reference in PEAR_DIR\PhpDocumentor\phpDocumentor\Setup.inc.php on line 515 I pulled up the source and line 515 reads: $test = array_pop(explode("/",$file)); As a test I changed it to: $__tests = explode("/",$file); $test = array_pop($__tests); And it carried on for a while until it ran into another one of those bugs. It looks like 5.0.5 is a little stricter.

Comments

 [2005-09-30 14:59 UTC] doom2 at op dot pl
The same effect on FreeBSD 5.4-STABLE PHP 5.0.5 & PhpDocumentor 1.3.0RC3
 [2005-10-06 21:42 UTC] belgampaul at gmail dot com
it stopped working with my PHP too and quite unexpectedly. I didn't even upgrade to PHP 5.0.5 i had a clean install and PHPDocumenter worked fine till today. I don't remember changing anything in config files. is there any solution to the problem or is it really a bug?
 [2005-10-11 07:12 UTC] cray2k at hotmail dot com
I had the same problem. since i'm planning to build my docs from command-line, i installed php-5.0.4-Win32 seperately (unzip, change .ini file, done!) and executed phpDocumentor from there. hope this help someone.
 [2005-10-13 12:36 UTC] pear dot php dot net at chsc dot dk
Same problems exists in phpDocumentor\Setup.inc.php line 628 and in phpDocumentor/Io.inc.php line 472.
 [2005-10-18 16:03 UTC] yutlin at gmail dot com
Is this problem being worked on? Does anyone have a short-term patch that will correct the issue?
 [2005-10-20 08:10 UTC] drewish at php dot net
I've got a patch that needs code review: http://drewish.com/projects/pear/patches/phpdoc_array_by_reference.patch When correcting the affected code, I tried to make the intent clearer by replacing calls to array_pop() with calls to basename() and pathinfo().
 [2005-10-26 16:06 UTC] jeichorn at php dot net
I haven't applied the patch, but i read through it, it looks good.
 [2005-10-26 18:20 UTC] mauceri at dreamcoders dot de
I edited every line you mentioned in your patch but I still get an error: Fatal error: Only variables can be passed by reference in /var/www/phpDocumentor/phpDocumentor/Setup.inc.php on line 637
 [2005-10-26 18:27 UTC] mauceri at dreamcoders dot de
Solved the one above, now I get: Fatal error: Function name must be a string in /var/www/phpDocumentor/phpDocumentor/Io.inc on line 476
 [2005-10-26 21:24 UTC] drewish at php dot net
You're correct, I missed the one on Setup.inc.php:637. I'm looking at Io.inc:476 and it looks like it should be okay. I'll do a little testing...
 [2005-10-26 23:02 UTC] drewish at php dot net
mauceri, thanks for your feedback. That error on Setup.inc.php:637 was a stupid mistake. I had used () instead of []. I've rolled a new patch that should correct all these issues: http://drewish.com/projects/pear/patches/phpdoc_array_by_reference_v2.patch If it's more convienient I've also put up a test release: http://drewish.com/projects/pear/PhpDocumentor/PhpDocumentor-1.3.0RC4.tgz
 [2005-10-27 07:58 UTC] mauceri at dreamcoders dot de
The last patch works perfectly. Thank you very very much...
 [2005-11-04 19:09 UTC] drewish at php dot net
From an comment emailed to me by Stefan Kilp. He was extracting the files from the archive (i.e. not using the pear installer): i followed the discussion in http://pear.php.net/bugs/bug.php?id=5371 where you released a new rc4. trying this new RC4 i have the following problems. common.inc.php Converter.inc IntermediateParser.inc Setup.inc.php is missing, so the fixes you did don't work. sorry, but i don't know how to apply the patch-file. could you give me the patched missing files. i would build a new rc4a with them.
 [2005-11-17 22:27 UTC] drewish at php dot net
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. It's fixed in CVS but I'll have to follow up with Greg or Joshua about rolling a new package...