* Depositories are meant to store and retrieve Entities from the database.
*
* The reason why there are methods prefixed with an underscore is because PHP doesn't support generic polymorphism
- * which means we can't direcly overload base methods and make parameters more strict (from a parent class to a child
+ * which means we can't directly overload base methods and make parameters more strict (from a parent class to a child
* class for example)
*
* Similarly, we can't make an overloaded method return type more strict until we only support PHP version 7.4 but this
}
}
- if (isset($max_id)) {
+ if (isset($max_id) && $max_id > 0) {
$boundCondition = DBA::mergeConditions($boundCondition, ['`id` < ?', $max_id]);
if (!isset($min_id) && (!isset($params['order']['id']) || $params['order']['id'] === false || $params['order']['id'] === 'ASC')) {
$reverseOrder = true;