View Issue Details

IDProjectCategoryView StatusLast Update
0003812Composr alpha bug reports[All Projects] General / Uncategorisedpublic2019-06-09 22:01
ReporterSalmanAssigned ToChris Graham 
SeverityFeature-request 
Status resolvedResolutionfixed 
Summary0003812: CQC tries to parse Nowdoc syntax as if it's Heredoc and gives errors
DescriptionCQC 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 ReproduceRun CQC on the sources/blocks/bottom_about_us.php file in the v11_redesign branch.
TagsNo tags attached.
Sponsorship open

Activities

Chris Graham

2019-06-09 22:01

administrator   ~0005962

Fixed in bb5f53b04a614a14645fe000a60842d846c05ba1. Not sure when it'll get merged through to v11 branch.

Issue History

Date Modified Username Field Change
2019-06-03 02:00 Salman New Issue
2019-06-09 22:01 Chris Graham Assigned To => Chris Graham
2019-06-09 22:01 Chris Graham Status non-assigned => resolved
2019-06-09 22:01 Chris Graham Resolution open => fixed
2019-06-09 22:01 Chris Graham Note Added: 0005962
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised