Skip to content

Commit

Permalink
refactoring due to hhvm memory leak #45
Browse files Browse the repository at this point in the history
  • Loading branch information
imsamurai committed Dec 19, 2014
1 parent 78787f9 commit fd2b1cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/Config/HttpSourceEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,9 @@ public function buildRequest(Model $model, array $queryData) {
*/
public function processFields(Model $model, array &$results) {
foreach ($results as &$result) {
$result += array_fill_keys(array_keys($this->_fields), null);
foreach (array_keys($this->_fields) as $fieldName) {
$result[$fieldName] = isset($result[$fieldName]) ? $result[$fieldName] : null;
}
$result = $this->_process($result, $this->_fields, $model);
}
unset($result);
Expand Down

0 comments on commit fd2b1cc

Please sign in to comment.