1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00
phorge-phorge/src/infrastructure
epriestley fe6022cd97 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
2012-10-03 15:42:44 -07:00
..
__tests__ Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
celerity Make CelerityController extend PhabricatorController 2012-08-28 13:46:35 -07:00
daemon Fix irc server login 2012-08-30 13:52:33 -07:00
diff Set viewer for all handles loaded in controllers 2012-09-04 23:14:26 -07:00
edges Fix letter case 2012-08-15 17:22:46 -07:00
events Allow custom request checker prior to displaying page 2012-09-27 15:34:54 -07:00
internationalization Add a meta-application 2012-08-02 14:07:21 -07:00
javelin Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
lint Add a basic notification UI element 2012-06-13 15:00:24 -07:00
markup Add 'viewer' to some Remarkup callsites 2012-09-05 11:40:48 -07:00
query Allow projects to be set as policies 2012-09-13 10:15:08 -07:00
storage Load only valid properties in LiskDAO::loadFromArray() 2012-10-03 15:42:44 -07:00
testing Link Phabricator tests 2012-09-07 15:04:44 -07:00
util Fix a memory leak in PhabricatorGlobalLock 2012-08-10 11:28:43 -07:00
PhabricatorAccessLog.php Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
PhabricatorEnv.php Allow specifying custom syntax highlighter 2012-06-26 19:37:45 -07:00
PhabricatorRequestOverseer.php Fix $_SERVER['CONTENT_TYPE'] trigger a NOTICE error 2012-09-27 12:50:09 -07:00
PhabricatorScopedEnv.php Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
PhabricatorSetup.php Make storage.mysql-engine.max-size independent on max_allowed_packet 2012-08-27 15:56:45 -07:00