1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-26 23:40:57 +01:00

Fix a possible count(null) in PHUIInfoView

Summary:
See <https://discourse.phabricator-community.org/t/php7-2-exception-count-parameter-must-be-an-array-or-an-object-that-implements-countable/1031>.

PHP7.2 raises a warning about `count(scalar)` (GREAT!) and we have one here if the caller doesn't `setErrors(...)`.

Test Plan: Sanity-checked usage of `$this->errors`.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18964
This commit is contained in:
epriestley 2018-01-29 13:16:46 -08:00
parent 40e9806e3c
commit 1db281bcd1

View file

@ -10,7 +10,7 @@ final class PHUIInfoView extends AphrontTagView {
const SEVERITY_PLAIN = 'plain';
private $title;
private $errors;
private $errors = array();
private $severity = null;
private $id;
private $buttons = array();