Skip to content

filter() function - weird issue - detailed description for Deltic #5095

Answered by Deltik
Jimmi08 asked this question in Q&A Core
Discussion options

You must be logged in to vote

Your glue code is responsible for ensuring the right argument type(s). Otherwise, the behavior is undefined, as you could be passing bad data into the e107 core.

Here's a diagram showing the types that your glue code is juggling:

It just so happens that your JSON object sometimes gives you the string type to pass to e_parse::filter(), but there could also be a stdClass that is not acceptable to e_parse::filter(). You should perform error handling in your glue code to ensure that the e_parse::filter() is used correctly.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Jimmi08
Comment options

@Deltik
Comment options

Answer selected by Jimmi08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants