Skip to content

Commit

Permalink
Fix incorrect property accessing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajshort committed Feb 12, 2013
1 parent 585b037 commit 1bc2499
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/GridFieldOrderableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public function getSortTable(DataList $list) {
$extra = $list->getExtraFields();
$table = $list->getJoinTable();

if(array_key_exists($field, $extra->getValue($list))) {
return $table->getValue($list);
if(array_key_exists($field, $extra)) {
return $table;
}
}

Expand Down Expand Up @@ -266,8 +266,8 @@ protected function getSortTableClauseForIds(DataList $list, $ids) {
$extra = $list->getExtraFields();
$key = $list->getLocalKey();

if(array_key_exists($this->getSortField(), $extra->getValue($list))) {
return sprintf('"%s" %s', $key->getValue($list), $value);
if(array_key_exists($this->getSortField(), $extra)) {
return sprintf('"%s" %s', $key, $value);
}
}

Expand Down

0 comments on commit 1bc2499

Please sign in to comment.