Skip to content

Commit e8ac443

Browse files
committed
Need dummy matches arg for preg_match_all() PHP 5.3 (arghh).
1 parent 4cc65fd commit e8ac443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cli/cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function safe_substr( $str, $start, $length = false, $is_width = false, $encodin
202202
// Set the East Asian Width regex.
203203
$eaw_regex = get_unicode_regexs( 'eaw' );
204204
// If there's any East Asian double-width chars...
205-
if ( preg_match( $eaw_regex, $substr ) ) {
205+
if ( preg_match( $eaw_regex, $substr, $dummy /*needed for PHP 5.3*/ ) ) {
206206
// Note that if the length ends in the middle of a double-width char, the char is included, not excluded.
207207

208208
// See if it's all EAW - the most likely case.

0 commit comments

Comments
 (0)