Fix #176: syntax error on line 12387 (invalid usage of array index)

Fix a syntax error issue when accessing an index of a casted variable
This commit is contained in:
Enrico 2020-02-14 11:47:31 +01:00 committed by GitHub
parent 510070b5e0
commit cea137671f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12384,7 +12384,8 @@ class TCPDF {
$x = $this->w;
}
$fixed = false;
if ((string)$page && (((string)$page)[0] == '*')) {
$pageAsString = (string) $page;
if ($pageAsString && $pageAsString[0] == '*') {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;