Browse Source

fixed getAll query

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
75e0a48e24
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/Utils/LuDataAccess.php

+ 2
- 1
src/Utils/LuDataAccess.php View File

@@ -133,6 +133,7 @@ abstract class LuDataAccess {
133 133
 
134 134
     public static function getAll($page = 0, $perPage = PHP_INT_MAX, $query = "")
135 135
     {
136
-        return self::getMultiple(static::getQueryPredicate($query), static::getOrderBy(), $page, $perPage);
136
+        $predicates = (is_null($query) || $query == "") ? array() : static::getQueryPredicate($query);
137
+        return self::getMultiple($predicates, static::getOrderBy(), $page, $perPage);
137 138
     }
138 139
 }

Loading…
Cancel
Save