summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Villegas2013-10-25 05:07:26 (GMT)
committer Marco Villegas2013-10-25 05:07:26 (GMT)
commite0bbdf434a7617cb30e596114509522728e3dfdd (patch)
tree5ffabfde3567358693949a68c07bdd2fdfc4f75c
parent159ed2c9595fa11e734cd1d1ee796964d8a922ff (diff)
fakeselect: check is there is something to order before ordering
-rw-r--r--tests/Drupal/migrate/Tests/FakeSelect.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Drupal/migrate/Tests/FakeSelect.php b/tests/Drupal/migrate/Tests/FakeSelect.php
index bff0654..8ea08c5 100644
--- a/tests/Drupal/migrate/Tests/FakeSelect.php
+++ b/tests/Drupal/migrate/Tests/FakeSelect.php
@@ -87,7 +87,9 @@ class FakeSelect extends Select {
$results = $this->executeJoins();
$this->resolveConditions($this->where, $results);
- usort($results, array($this, 'sortCallback'));
+ if (!empty($this->order)) {
+ usort($results, array($this, 'sortCallback'));
+ }
if (!empty($this->range)) {
$results = array_slice($results, $this->range['start'], $this->range['length']);
}