#3812 - CQC tries to parse Nowdoc syntax as if it's Heredoc and gives errors

  • By
  • Added
  • 7 views
Identifier #3812
Issue type Feature request or suggestion
Title CQC tries to parse Nowdoc syntax as if it's Heredoc and gives errors
Status Completed
Handling member Chris Graham
Addon General / Uncategorised
Description CQC Errors:
WARNING "sources\blocks\bottom_about_us.php" 54 29 PHP: Do not use quotes with the simple variable embedding syntax
ERROR "sources\blocks\bottom_about_us.php" 0 0 PHP: Expected variable ($) but got

I am using Heredoc syntax for block caching environment info to make it readable and get IDE syntax highlighting, e.g.:

public function caching_environment()
{
$info = array();
$info['cache_on'] = <<<'PHP'
array(
!empty($map['facebook']) ? $map['facebook'] : '',
!empty($map['twitter']) ? $map['twitter'] : '',
!empty($map['instagram']) ? $map['instagram'] : '',
!empty($map['youtube']) ? $map['youtube'] : '',
)
PHP;
$info['ttl'] = (get_value('disable_block_timeout') === '1') ? 60 * 60 * 24 * 365 * 5/*5 year timeout*/ : 60;
return $info;
}

Steps to reproduce

Run CQC on the sources/blocks/bottom_about_us.php file in the v11_redesign branch.

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated