diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/metadata.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 955939e42..d4652cf7f 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -739,9 +739,11 @@ function elgg_get_entity_metadata_where_sql($table, $names = NULL, $values = NUL // if the value is an int, don't quote it because str '15' < str '5' // if the operand is IN don't quote it because quoting should be done already. //$value = trim(strtolower($operand)) == 'in' ? $pair['value'] : "'{$pair['value']}'"; - if (trim(strtolower($operand)) == 'in' || sanitise_int($pair['value'])) { + if (trim(strtolower($operand)) == 'in' || is_numeric($pair['value'])) { + var_dump(sanitise_int($pair['value'])); $value = sanitise_string($pair['value']); } else { + var_dump("Not clenaing {$pair['value']}"); $value = '\'' . sanitise_string($pair['value']) . '\''; } |