Skip to content

Commit

Permalink
Fixed bug in ordering column validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mesour committed Mar 8, 2016
1 parent 2645308 commit 20b23db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mesour/DataGrid/Column/core/Ordering.php
Expand Up @@ -36,7 +36,7 @@ public function validate(array $rowData, $data = [])
{
parent::validate($rowData, $data);

if ($this->hasOrdering()) {
if ($this->hasOrdering() && count($rowData) > 0) {
$item = reset($rowData);
if (!array_key_exists($this->getName(), $item)) {
throw new Mesour\InvalidStateException(
Expand Down

0 comments on commit 20b23db

Please sign in to comment.