diff --git a/lib/tcpdf/tcpdf.php b/lib/tcpdf/tcpdf.php index 0ee30bc0d15..4dedf41ff2a 100644 --- a/lib/tcpdf/tcpdf.php +++ b/lib/tcpdf/tcpdf.php @@ -4715,14 +4715,14 @@ class TCPDF { * Defines the page and position a link points to. * @param $link (int) The link identifier returned by AddLink() * @param $y (float) Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) - * @param $page (int) Number of target page; -1 indicates the current page (default value). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. + * @param $page (int|string) Number of target page; -1 indicates the current page (default value). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. * @public * @since 1.5 * @see AddLink() */ public function SetLink($link, $y=0, $page=-1) { $fixed = false; - if (!empty($page) AND ($page[0] == '*')) { + if (!empty($page) AND is_string($page) AND ($page[0] == '*')) { $page = intval(substr($page, 1)); // this page number will not be changed when moving/add/deleting pages $fixed = true;