diff --git a/libraries/legacy/request/request.php b/libraries/legacy/request/request.php index 9f03d2ff89c65..01528dc898167 100644 --- a/libraries/legacy/request/request.php +++ b/libraries/legacy/request/request.php @@ -514,6 +514,8 @@ public static function checkToken($method = 'post') */ protected static function _cleanVar($var, $mask = 0, $type = null) { + $mask = (int) $mask; + // If the no trim flag is not set, trim the variable if (!($mask & 1) && is_string($var)) {