Merge pull request #183 from bolduz/bolduz-tcpdf-fix-176

Fix #176: syntax error on line 12387 (invalid usage of array index)
This commit is contained in:
Nicola Asuni 2020-02-14 14:17:28 +00:00 committed by GitHub
commit 6ca08645e2
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;