Fix implicit conversion from float to int (#387)

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2021-07-20 11:23:33 -03:00 committed by GitHub
parent 150e756428
commit ea9e1c4145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4179,8 +4179,8 @@ class TCPDF {
// SHY character will not be printed
return (0);
}
if (isset($this->CurrentFont['cw'][$char])) {
$w = $this->CurrentFont['cw'][$char];
if (isset($this->CurrentFont['cw'][intval($char)])) {
$w = $this->CurrentFont['cw'][intval($char)];
} elseif (isset($this->CurrentFont['dw'])) {
// default width
$w = $this->CurrentFont['dw'];