Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update crayon_formatter.class.php #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update crayon_formatter.class.php #449

wants to merge 1 commit into from

Conversation

yokada
Copy link

@yokada yokada commented Oct 14, 2018

No description provided.

@stevegrunwell
Copy link

To provide some context on this, logs are getting filled up with the following PHP notice:

PHP Notice:  A non well formed numeric value encountered in /path/to/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

The issue appears to be that mathematical operations are being carried out on the string version of $font_size, not the numeric value.

// Defined at the top of the method:
$_font_size = $hl->setting_val(CrayonSettings::FONT_SIZE);
$font_size = $_font_size . 'px !important;';

// This would be `$_font_size . 'px !important;' * 1.5 . 'px !important;'.
$toolbar_height = $font_size * 1.5 . 'px !important;';

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.

2 participants