aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/metadata.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 71337db09..d9b310b15 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -1011,8 +1011,8 @@ function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type
*/
function elgg_list_entities_from_metadata($options) {
$defaults = array(
- 'offset' => get_input('offset', 0),
- 'limit' => get_input('limit', 10),
+ 'offset' => (int) max(get_input('offset', 0), 0),
+ 'limit' => (int) max(get_input('limit', 10), 0),
'full_view' => TRUE,
'view_type_toggle' => FALSE,
'pagination' => TRUE