Count(): Parameter must be an array or an object that implements Countable at phabricator/src/view/phui/PHUIInfoView.php


#1

Observed Behavior:
When I visit any page,
Error log:

mod_fcgid: stderr: [2018-02-02 07:41:25] ERROR 2: count(): Parameter must be an array or an object that implements Countable at [phabricator/src/view/phui/PHUIInfoView.php:126]

mod_fcgid: stderr: [2018-02-02 07:41:25] ERROR 2: count(): Parameter must be an array or an object that implements Countable at [phabricator/src/view/phui/PHUIInfoView.php:140]

This is a PHP 7.2 compatibility issue. In PHP 7.2:

An E_WARNING will now be emitted when attempting to count() non-countable types (this includes the sizeof() alias function).

Phabricator Version:

phabricator 4757ff224c7f20e1f4fcc9333c42c3533d9c9b09 (Thu, Feb 1)

arcanist 886f6e6360ac6069ca8b8af12f69523deee6feda (Sat, Jan 20) (branched from 2e02332216c692e9bcedfa95d30602173050d7ca on origin)

phutil 53f01ac1ae7815bc55e8c1532fe3de12287c8e24 (Sat, Jan 20) (branched from 2d8cdda8cc4c12600099ccdf0c6cb84b468691e1 on origin)

Reproduction Steps:
Visit any page


#2

I believe this was fixed in master by https://secure.phabricator.com/D18964 (Jan 29th). I’ve cherry-picked it to stable (rPf3f1f106b16b3bc296b9bcfc16b3ce48b2036b6a).

(master should also promote to stable in about 8 hours.)


#3

Thanks you.