Bug #16632 [Opn]: Upgrade to/Install of PEAR 1.9.0 fails w/PHP4
| From: | daniel dot oconnor at gmail dot com | Date: | Tue, 22 Sep 2009 00:31:44 +0000 |
| Subject: | Bug #16632 [Opn]: Upgrade to/Install of PEAR 1.9.0 fails w/PHP4 | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1695@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16632&edit=1
ID: 16632
Updated by: daniel.oconnor@gmail.com
Reported By: ryan dot m dot lange at gmail dot com
Summary: Upgrade to/Install of PEAR 1.9.0 fails w/PHP4
Status: Open
Type: Bug
Package: PEAR
Operating System: FreeBSD 6.3
Package Version: 1.8.1
PHP Version: 4.4.9
Roadmap Versions:
New Comment:
Hey Ryan, just FYI, in the near future (PEAR2) PHP4 support will be a
thing of the past. We're only talking around 6 months here at most, so
if you haven't started planning to migrate, please do so!
Previous Comments:
------------------------------------------------------------------------
[2009-09-21 16:12:35] cl1mh4224rd
-Package Version: 1.9.0
+Package Version: 1.8.1
I'm changing the package version. This is apparently a bug in v2 of the
package file generator for PEAR 1.8.1 and not related to PEAR 1.9.0.
Rewriting the offending foreach loop to be PHP4-compatible allowed the
upgrade to PEAR 1.9.0 to succeed.
------------------------------------------------------------------------
[2009-09-21 15:56:35] cl1mh4224rd
Description:
------------
The commands
pear upgrade-all, pear upgrade PEAR, and `pear install
PEAR-1.9.0` all fail with the following message:
-----
PHP Parse error: syntax error, unexpected '&', expecting T_VARIABLE or
'$' in /usr/local/php4/lib/php/PEAR/PackageFile/Generator/v2.php on line
380
-----
The offending line is:
-----
foreach ($arr['changelog']['release'] as &$c) {
-----
Now, as I understand it, the use of an ampersand on the right-hand side
of a foreach is a feature of PHP5 and is illegal in PHP4.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16632&edit=1