From 1db281bcd1bbe141817fe6bc14a9d5dae3e612c5 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 29 Jan 2018 13:16:46 -0800 Subject: [PATCH] Fix a possible `count(null)` in PHUIInfoView Summary: See . 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 --- src/view/phui/PHUIInfoView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/phui/PHUIInfoView.php b/src/view/phui/PHUIInfoView.php index 161e49108b..69d0549299 100644 --- a/src/view/phui/PHUIInfoView.php +++ b/src/view/phui/PHUIInfoView.php @@ -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();