Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a few more function argument updates for PHP 8 compatibility #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions tcpdf/include/tcpdf_fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ public static function getUniord($uch) {
* @author Nicola Asuni
* @public static
*/
public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
public static function UTF8StringToArray($str, $isunicode, &$currentfont) {
if ($isunicode) {
// requires PCRE unicode support turned on
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
Expand All @@ -2018,7 +2018,7 @@ public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
* @since 3.2.000 (2008-06-23)
* @public static
*/
public static function UTF8ToLatin1($str, $isunicode=true, &$currentfont) {
public static function UTF8ToLatin1($str, $isunicode, &$currentfont) {
$unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values
return self::UTF8ArrToLatin1($unicode);
}
Expand All @@ -2034,7 +2034,7 @@ public static function UTF8ToLatin1($str, $isunicode=true, &$currentfont) {
* @since 1.53.0.TC005 (2005-01-05)
* @public static
*/
public static function UTF8ToUTF16BE($str, $setbom=false, $isunicode=true, &$currentfont) {
public static function UTF8ToUTF16BE($str, $setbom, $isunicode, &$currentfont) {
if (!$isunicode) {
return $str; // string is not in unicode
}
Expand All @@ -2054,7 +2054,7 @@ public static function UTF8ToUTF16BE($str, $setbom=false, $isunicode=true, &$cur
* @since 2.1.000 (2008-01-08)
* @public static
*/
public static function utf8StrRev($str, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) {
public static function utf8StrRev($str, $setbom, $forcertl, $isunicode, &$currentfont) {
return self::utf8StrArrRev(self::UTF8StringToArray($str, $isunicode, $currentfont), $str, $setbom, $forcertl, $isunicode, $currentfont);
}

Expand All @@ -2071,7 +2071,7 @@ public static function utf8StrRev($str, $setbom=false, $forcertl=false, $isunico
* @since 4.9.000 (2010-03-27)
* @public static
*/
public static function utf8StrArrRev($arr, $str='', $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) {
public static function utf8StrArrRev($arr, $str, $setbom, $forcertl, $isunicode, &$currentfont) {
return self::arrUTF8ToUTF16BE(self::utf8Bidi($arr, $str, $forcertl, $isunicode, $currentfont), $setbom);
}

Expand All @@ -2087,7 +2087,7 @@ public static function utf8StrArrRev($arr, $str='', $setbom=false, $forcertl=fal
* @since 2.4.000 (2008-03-06)
* @public static
*/
public static function utf8Bidi($ta, $str='', $forcertl=false, $isunicode=true, &$currentfont) {
public static function utf8Bidi($ta, $str, $forcertl, $isunicode, &$currentfont) {
// paragraph embedding level
$pel = 0;
// max level
Expand Down