Error/Bug in elements/block_area_footer.php
Permalink
Hello all,
I just noticed a strange behaviour on my testsite regarding invalid jquery/javascript code for editable areas. Part of the generated code was:
i.e. a missing value for canWrite. Tracing back, I found following statement in
concrete/elements/block_area_footer.php, line 34:
The echo-statement produces an empty string,
when the boolean value is FALSE.
As this seems to be a common idiom echoing
directly boolean values, I'd propose
using a more robust statement, that does not depend on the string representation of
FALSE, which obviously might be an empty string and render invalid code.
Best regards
I just noticed a strange behaviour on my testsite regarding invalid jquery/javascript code for editable areas. Part of the generated code was:
<script type="text/javascript"> 255 ccm_areaMenuObj41 = new Object(); 256 ccm_areaMenuObj41.type = "AREA"; 257 ccm_areaMenuObj41.aID = 41; 258 ccm_areaMenuObj41.arHandle = "Content"; 259 ccm_areaMenuObj41.canAddBlocks = 1; 260 ccm_areaMenuObj41.canWrite = ;
i.e. a missing value for canWrite. Tracing back, I found following statement in
concrete/elements/block_area_footer.php, line 34:
The echo-statement produces an empty string,
when the boolean value is FALSE.
As this seems to be a common idiom echoing
directly boolean values, I'd propose
using a more robust statement, that does not depend on the string representation of
FALSE, which obviously might be an empty string and render invalid code.
Best regards