Skip to content
Snippets Groups Projects
Commit bf8116fa authored by Klaus Purer's avatar Klaus Purer
Browse files

Fixed PHP warnings when checking arrays in template files

parent dc295ba6
Branches
Tags
No related merge requests found
......@@ -110,6 +110,12 @@ class Drupal_Sniffs_Array_ArraySniff implements PHP_CodeSniffer_Sniff
// Find the first token on this line.
$firstLineColumn = $tokens[$stackPtr]['column'];
for ($i = $stackPtr; $i >= 0; $i--) {
// If there is a PHP open tag then this must be a template file where we
// don't check indentation.
if ($tokens[$i]['code'] === T_OPEN_TAG) {
return;
}
// Record the first code token on the line.
if ($tokens[$i]['code'] !== T_WHITESPACE) {
$firstLineColumn = $tokens[$i]['column'];
......
......@@ -27,3 +27,8 @@
</div>
<br />
<?php print $foo; ?>
<?php print l($app['icon'], $app['site_url'], array(
'html' => TRUE,
'attributes' => array('target' => '_blank'),
)
) ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment