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
F17953507: D19140.id45847.diff
Fri, Aug 1, 3:09 AM
F17696109: D19140.id45847.diff
Jul 15 2025, 5:05 PM
Unknown Object (File)
Jul 2 2025, 4:59 AM
Unknown Object (File)
Jun 17 2025, 11:23 AM
Unknown Object (File)
May 17 2025, 10:30 PM
Unknown Object (File)
May 11 2025, 11:08 PM
Unknown Object (File)
May 8 2025, 5:25 AM
Unknown Object (File)
May 8 2025, 4:04 AM
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
Branch
tableview_null_countables (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19657
Build 26620: Run Core Tests
Build 26619: arc lint + arc unit

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.