Skip to content

Commit 846d8a9

Browse files
author
gitlost
committed
Use call_user_func_array instead of variable for PHP < 7 compat.
1 parent 1c7315c commit 846d8a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ function unfc_parse_unicode_data( $file, $callback ) {
384384
if ( $last === substr( $name, $last_len_minus ) ) {
385385
$last_cp = hexdec( $parts[0] );
386386
for ( $cp = $first_cp + 1; $cp <= $last_cp; $cp++ ) {
387-
if ( false === $callback( $codepoints, $cp, $name, $parts, $in_interval, $first_cp, $last_cp ) ) {
387+
if ( false === call_user_func_array( $callback, array( &$codepoints, $cp, $name, $parts, $in_interval, $first_cp, $last_cp ) ) ) {
388388
error_log( "unfc_parse_unicode_data: user func fail line_num=$line_num" );
389389
}
390390
}
@@ -398,7 +398,7 @@ function unfc_parse_unicode_data( $file, $callback ) {
398398
$in_interval = true;
399399
$first_cp = $cp;
400400
}
401-
if ( false === $callback( $codepoints, $cp, $name, $parts, $in_interval, $first_cp, 0 /*$last_cp*/ ) ) {
401+
if ( false === call_user_func_array( $callback, array( &$codepoints, $cp, $name, $parts, $in_interval, $first_cp, 0 /*$last_cp*/ ) ) ) {
402402
error_log( "unfc_parse_unicode_data: user func fail line_num=$line_num" );
403403
}
404404
}

0 commit comments

Comments
 (0)