aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 14:11:41 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 14:11:41 +0000
commit4b47e478929925086f75ac492017c3ce63712ec7 (patch)
tree392b1a5f762dbb23cd8e93de2302b7f2f0099b93 /engine
parent538a22b85384008533aeef2ac356ff668766e0cb (diff)
downloadelgg-4b47e478929925086f75ac492017c3ce63712ec7.tar.gz
elgg-4b47e478929925086f75ac492017c3ce63712ec7.tar.bz2
Ensuring malformed offset/limit values are ignored by elgg_list_entities_from_metadata().
Refs #2046 git-svn-id: http://code.elgg.org/elgg/trunk@5644 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-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