Skip to content

Conversation

@stephenharris
Copy link

$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

`$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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant