Adding better handling of json alike filter values
This commit is contained in:
parent
48d85cfed5
commit
27f32804cc
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue