"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.
This commit is contained in:
csears123 2017-08-02 09:50:11 -06:00 committed by GitHub
parent 95c5938aaf
commit dc6b90d65b

View File

@ -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