diff --git a/src/codegen.inc.php b/src/codegen.inc.php index b87c96f..f2d1998 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -113,7 +113,9 @@ function apply_filters($token_prefix, $field_name, array $tokens, $val, $add_ass if(function_exists($filter_func)) { $args = null; - if($args_json && (strpos($args_json, '[') === 0 || strpos($args_json, '{') === 0)) + if($args_json && + ((strpos($args_json, '[') === 0 && strlen($args_json) > 1 && $args_json[strlen($args_json)-1] === ']') || + (strpos($args_json, '{') === 0 && strlen($args_json) > 1 && $args_json[strlen($args_json)-1] === '}'))) { $args = json_decode($args_json, true); if(!is_array($args))