[pkg-php-pear] Bug#805222: [Pkg-php-pecl] Bug#805222: php-apcu: FTBFS: PHP Fatal error: Call to a member function getFilelist() on null

Mathieu Parent (Debian) sathieu at debian.org
Sat Mar 12 22:42:59 UTC 2016


2016-03-12 22:30 GMT+01:00 Mathieu Parent (Debian) <sathieu at debian.org>:
> ... About the FTBFS of PECL extensions...
[...]
> $ git bisect visualize
> commit 4a66490bdecd5e4ec2b8213e89a6e40aaa18975e
> Author: Christian Weiske <cweiske at cweiske.de>
> Date:   Mon Feb 9 23:26:33 2015 +0100
>
>     Fix for PHP 7: Replace "&new" with "new" (new-by-reference)

And the following patch fix the FTBFS:

diff --git a/PEAR/Config.php b/PEAR/Config.php
index 5b3f1e2..7b21726 100644
--- a/PEAR/Config.php
+++ b/PEAR/Config.php
@@ -2119,10 +2119,10 @@ class PEAR_Config extends PEAR
                 if ($layer == 'ftp' || !isset($this->_registry[$layer])) {
                     continue;
                 }
-                $this->_registry[$layer] =
-                    new PEAR_Registry(
+                $r = new PEAR_Registry(
                         $this->get('php_dir', $layer,
'pear.php.net'), false, false,
                         $this->get('metadata_dir', $layer, 'pear.php.net'));
+                $this->_registry[$layer] = &$r;
                 $this->_registry[$layer]->setConfig($this, false);
                 $this->_regInitialized[$layer] = false;
             }
(still php 5.6)

Regards


-- 
Mathieu Parent



More information about the pkg-php-pear mailing list