5.6.4.0 and PHP 7.4 Warnings (continue)
Permalink
I have one legacy 5.6.4.0 site where the server was upgraded to PHP 7.4 (7.2 is no longer available there).
I know it's no longer supported, but I am seeing only 3 errors so far in the core:
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in concrete/core/models/custom_style.php on line 75
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in concrete/core/models/custom_style.php on line 82
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in concrete/core/models/custom_style.php on line 93
Anyone know if those should be changed to break; or continue 2; ?
I know I could just try changing them myself, but I don't know how to test it. Unfortunately Xdebug is not available there.
I see it is only called in 3 places:
Any hint(s) on an easy way to visually check if one or the other works properly?
Thanks!
- John
I know it's no longer supported, but I am seeing only 3 errors so far in the core:
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in concrete/core/models/custom_style.php on line 75
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in concrete/core/models/custom_style.php on line 82
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in concrete/core/models/custom_style.php on line 93
Anyone know if those should be changed to break; or continue 2; ?
I know I could just try changing them myself, but I don't know how to test it. Unfortunately Xdebug is not available there.
I see it is only called in 3 places:
concrete/tools/edit_block_popup.php: $styleHeader = '#'.$csr->getCustomStyleRuleCSSID(1).' {'. $csr->getCustomStyleRuleText(). "}"; ?> concrete/core/models/collection.php: $styleHeader .= '#'.$st->getCustomStyleRuleCSSID(1).' {'. $st->getCustomStyleRuleText(). "} \r\n"; concrete/core/controllers/blocks/core_stack_display.php: $styleHeader = '#'.$csr->getCustomStyleRuleCSSID(1).' {'. $csr->getCustomStyleRuleText(). "} \r\n";
Any hint(s) on an easy way to visually check if one or the other works properly?
Thanks!
- John
Here is the code I am using in the file 'concrete/core/models/custom_style.php' from line 45 to line 96, this is being used in several 5.6.4.0 sites running on PHP 7.4
PHP 7.4 appears quite happy with it as I see no errors.