crayon-syntax-highlighter icon indicating copy to clipboard operation
crayon-syntax-highlighter copied to clipboard

Fix strings being used as a numerical value

Open stephenharris opened this issue 8 years ago • 0 comments
trafficstars

$font_size holds the font size as a string, e.g. ("12px !important;"), but is being used in calculations such as $_font_size * 1.5. On PHP 7+ this will give a notice. For calculations, the numerical value stored in $_font_size or CrayonGlobalSettings::get(CrayonSettings::FONT_SIZE))->def() should be used instead.

Fixes one of the issues reported in https://wordpress.org/support/topic/failed-to-open-stream-error-when-creating-new-post/#post-8663430

stephenharris avatar Jan 17 '17 10:01 stephenharris