mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Provide default values for table view properties which are count
ed
Summary: PHP 7.2 has changed the behavior of `count`, you must provide an array or `Countable` as a parameter, otherwise a warning is generated. These two class members are counted during rendering, and are commonly left as null properties. https://wiki.php.net/rfc/counting_non_countables Test Plan: Browsed around my install and stopped seeing `count(): Parameter must be an array or an object that implements Countable at [AphrontTableView.php:153]` everywhere. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D19140
This commit is contained in:
parent
4c7370a1a3
commit
7aab7e80af
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ final class AphrontTableView extends AphrontView {
|
||||||
|
|
||||||
protected $data;
|
protected $data;
|
||||||
protected $headers;
|
protected $headers;
|
||||||
protected $shortHeaders;
|
protected $shortHeaders = array();
|
||||||
protected $rowClasses = array();
|
protected $rowClasses = array();
|
||||||
protected $columnClasses = array();
|
protected $columnClasses = array();
|
||||||
protected $cellClasses = array();
|
protected $cellClasses = array();
|
||||||
|
@ -21,7 +21,7 @@ final class AphrontTableView extends AphrontView {
|
||||||
protected $sortParam;
|
protected $sortParam;
|
||||||
protected $sortSelected;
|
protected $sortSelected;
|
||||||
protected $sortReverse;
|
protected $sortReverse;
|
||||||
protected $sortValues;
|
protected $sortValues = array();
|
||||||
private $deviceReadyTable;
|
private $deviceReadyTable;
|
||||||
|
|
||||||
public function __construct(array $data) {
|
public function __construct(array $data) {
|
||||||
|
|
Loading…
Reference in a new issue