diff --git a/crayon_formatter.class.php b/crayon_formatter.class.php index 9adf4c46..4863c72c 100644 --- a/crayon_formatter.class.php +++ b/crayon_formatter.class.php @@ -115,8 +115,8 @@ public static function print_code($hl, $code, $line_numbers = TRUE, $print = TRU $_line_height = $hl->setting_val(CrayonSettings::LINE_HEIGHT); // Don't allow line height to be less than font size $line_height = ($_line_height > $_font_size ? $_line_height : $_font_size) . 'px !important;'; - $toolbar_height = $font_size * 1.5 . 'px !important;'; - $info_height = $font_size * 1.4 . 'px !important;'; + $toolbar_height = floatval($font_size) * 1.5 . 'px !important;'; + $info_height = floatval($font_size) * 1.4 . 'px !important;'; $font_style .= "font-size: $font_size line-height: $line_height"; $toolbar_style .= "font-size: $font_size"; @@ -131,7 +131,7 @@ public static function print_code($hl, $code, $line_numbers = TRUE, $print = TRU } else if (!$hl->is_inline()) { if (($font_size = CrayonGlobalSettings::get(CrayonSettings::FONT_SIZE)) !== FALSE) { $font_size = $font_size->def() . 'px !important;'; - $line_height = ($font_size * 1.4) . 'px !important;'; + $line_height = (floatval($font_size) * 1.4) . 'px !important;'; } } diff --git a/util/crayon_util.class.php b/util/crayon_util.class.php index 9a40608c..626aeef9 100644 --- a/util/crayon_util.class.php +++ b/util/crayon_util.class.php @@ -70,7 +70,7 @@ public static function lines($path, $opts = NULL) { if ($whitespace) { $delimiter = CRAYON_NL; } - $lines = implode($lines, $delimiter); + $lines = implode($delimiter, $lines); } return $lines; @@ -645,7 +645,7 @@ public static function get_var_str() { foreach ($_GET as $get => $val) { $get_vars[] = $get . '=' . $val; } - return implode($get_vars, '&'); + return implode('&', $get_vars); } // Creates a unique ID from a string