Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Ctype/Ctype.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ public static function ctype_xdigit($text)
*/
private static function convert_int_to_char_for_ctype($int, $function)
{
if (\PHP_VERSION_ID >= 80100 && !\is_string($int)) {
@trigger_error($function.'(): Argument of type '.get_debug_type($int).' will be interpreted as string in the future', \E_USER_DEPRECATED);
}

if (!\is_int($int)) {
return $int;
}
Expand All @@ -219,10 +223,6 @@ private static function convert_int_to_char_for_ctype($int, $function)
return (string) $int;
}

if (\PHP_VERSION_ID >= 80100) {
@trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
}

if ($int < 0) {
$int += 256;
}
Expand Down
Loading