Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load only valid properties in LiskDAO::loadFromArray()
Summary: Fixes a TODO, and silences a warning introduced by D3601. There are several cases where we load data like: SELECT *, ... AS extraData FROM ... ...and then pass it to `loadAllFromArray()`. Currently, this causes us to set an `extraData` property on the object. This idiom seems fairly useful and non-dangerous, so I made `loadFromArray()` just drop extra keys. Since we hit this loop a potentially huge number of times (10,000+ for full Maniphest pages) I did some microoptimization. Lisk is hot enough that it's one of the few places where it's worthwhile (see D1291). Test Plan: Loaded homepage, no longer got warnings about `viewerIsMember` from Project queries. Browsed ~10 apps, didn't see any issues. Reviewers: vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D3606
- Loading branch information