Merge pull request #162 from LDAV/patch-1

Fix php7.4 error
This commit is contained in:
Nicola Asuni 2020-02-12 10:49:18 +00:00 committed by GitHub
commit f6fe2d7195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4722,7 +4722,7 @@ class TCPDF {
*/
public function SetLink($link, $y=0, $page=-1) {
$fixed = false;
if (!empty($page) AND ($page[0] == '*')) {
if (!empty($page) AND (substr($page, 0, 1) == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;
@ -12279,7 +12279,7 @@ class TCPDF {
$x = $this->w;
}
$fixed = false;
if (!empty($page) AND ($page[0] == '*')) {
if (!empty($page) AND (substr($page, 0, 1) == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;