Check from ExtraFields in getSortTableClauseForIds

if no extrafields are on the many_many relationship error generated same fix as chillu on getSortTable
This commit is contained in:
Adam 2014-07-09 22:47:11 +10:00
parent 1a521a3ce0
commit 5ddbf9cd43
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ class GridFieldOrderableRows extends RequestHandler implements
$foreignKey = $list->getForeignKey();
$foreignID = $list->getForeignID();
if(array_key_exists($this->getSortField(), $extra)) {
if($extra && array_key_exists($this->getSortField(), $extra)) {
return sprintf(
'"%s" %s AND "%s" = %d',
$key,