[pkg-php-pear] Bug#890433: php-pear: PEAR/RunTest.php uses count() on non-Countable

Nishanth Aravamudan nish.aravamudan at canonical.com
Wed Feb 14 18:27:25 UTC 2018


Package: php-pear
Version: 1:1.10.5+submodules+notgz-1
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu bionic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/php72_count_of_notcountable.patch: PHP7.2 warns when
    count() is called on non-Countable.


Thanks for considering the patch.

Description: PHP7.2 warns when count() is called on non-Countable
 As described on http://php.net/manual/en/migration72.incompatible.php
Author: Nishanth Aravamudan <nish.aravamudan at canonical.com>
Forwarded: Will be done by Nishanth Aravamudan
Last-Update: 2018-02-14

--- php-pear-1.10.5+submodules+notgz.orig/PEAR/RunTest.php
+++ php-pear-1.10.5+submodules+notgz/PEAR/RunTest.php
@@ -343,7 +343,7 @@ class PEAR_RunTest
 
         // Check if test should be skipped.
         $res  = $this->_runSkipIf($section_text, $temp_skipif, $tested, $ini_settings);
-        if (count($res) != 2) {
+        if (!is_array($res) || count($res) != 2) {
             return $res;
         }
         $info = $res['info'];

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd



More information about the pkg-php-pear mailing list