From dc6b90d65b5bbec32b887316f03a47356a1c4191 Mon Sep 17 00:00:00 2001 From: csears123 Date: Wed, 2 Aug 2017 09:50:11 -0600 Subject: [PATCH] "Non well formed numeric value" error occurs in PHP 7 The $size variable in the SetFontSize function is supposed to be a float type, but a string can be passed in like "14px" causing an error in PHP 7. Re-casting the variable is a simple solution to fix the variable type if it was incorrectly passed in. --- tcpdf.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tcpdf.php b/tcpdf.php index 65196e7..f2d5f82 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -4453,6 +4453,7 @@ class TCPDF { * @see SetFont() */ public function SetFontSize($size, $out=true) { + $size = (float)$size; // font size in points $this->FontSizePt = $size; // font size in user units