Page MenuHomePhabricator

Provide default values for table view properties which are `count`ed
ClosedPublic

Authored by yelirekim on Feb 25 2018, 8:19 PM.
Tags
None
Referenced Files
F13232001: D19140.diff
Tue, May 21, 12:56 AM
F13219419: D19140.id45847.diff
Sat, May 18, 6:08 PM
F13218926: D19140.diff
Sat, May 18, 1:45 PM
F13210887: D19140.diff
Fri, May 17, 5:18 AM
F13194798: D19140.diff
Sun, May 12, 9:53 PM
F13177530: D19140.diff
Wed, May 8, 7:46 PM
Unknown Object (File)
Thu, May 2, 10:33 PM
Unknown Object (File)
Mon, Apr 29, 3:37 PM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

yelirekim edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Feb 25 2018, 8:31 PM

(See D18964 previously -- I'm still on 7.1 locally so there may be a few more of these lurking around.)

This revision was automatically updated to reflect the committed changes.