Skip to content

Commit cda932e

Browse files
JanJakesnicolas-grekas
authored andcommitted
Add separate checks for all polyfilled functions and constants
1 parent 1b41732 commit cda932e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bootstrap.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
2020
}
2121
if (!function_exists('utf8_encode')) {
2222
function utf8_encode($s) { return p\Php72::utf8_encode($s); }
23+
}
24+
if (!function_exists('utf8_decode')) {
2325
function utf8_decode($s) { return p\Php72::utf8_decode($s); }
2426
}
2527
if (!function_exists('spl_object_id')) {
@@ -28,9 +30,13 @@ function spl_object_id($s) { return p\Php72::spl_object_id($s); }
2830
if (!defined('PHP_OS_FAMILY')) {
2931
define('PHP_OS_FAMILY', p\Php72::php_os_family());
3032
}
31-
if (!function_exists('mb_chr')) {
33+
if (!function_exists('mb_ord')) {
3234
function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); }
35+
}
36+
if (!function_exists('mb_chr')) {
3337
function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); }
38+
}
39+
if (!function_exists('mb_scrub')) {
3440
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
3541
}
3642
}

0 commit comments

Comments
 (0)