Language Injection in HEREDOC Strings

I was wondering if anyone knew how, or if it was even possible, to automatically detect injected languages in HEREDOC strings the same way that they are in single and double-quoted strings.  In my development house, we have a kind of coding convention where we use HEREDOC strings named for the language/code type that's contained within.  i.e.

$query = <<<SQL

SELECT

*

FROM

`foo`

WHERE

`id` = 1;
SQL;



Thanks,
Clay

2 comments
Comment actions Permalink

Hi there,

Your example works just fine -- SQL got injected.

Please check your rules at "Settings | Language Injections" (post a screenshot, if no luck).

Also -- what's your IDE version exactly (Help | About)

0
Comment actions Permalink

I discovered where I create new injection rules.  Thank you for the reply.  I was going to answer my own question, but I couldn't get around to it in time.

Maybe you should refer to it as something other than SQL injection.

0

Please sign in to leave a comment.