Skip to content

Commit

Permalink
Fix for issue flourishlib#7, populateRelated regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew J. Sahagian committed Nov 18, 2014
1 parent 423ce77 commit 87e194f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fORMRelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,14 @@ static public function populateRecords($class, &$related_records, $related_class
$pk_field = $filter . $first_pk_column;

$records = array();
$related_keys = fRequest::get($pk_field);
$input_keys = is_array($related_keys)
? array_keys($related_keys)
: [NULL];
$input_keys = array();

if (fRequest::check($pk_field)) {
$related_keys = fRequest::get($pk_field);
$input_keys = is_array($related_keys)
? array_keys($related_keys)
: [NULL];
}

foreach ($input_keys as $input_key) {
fRequest::filter($filter, $input_key);
Expand Down

0 comments on commit 87e194f

Please sign in to comment.