Skip to content

Commit 137eb30

Browse files
committed
Charset: Add missing return statement to _mb_ord().
This fixes a `return.missing` PHPStan error in `_mb_ord()`, fixing the only rule level 0 violation currently reported. In practice the `return` is in an unreachable code path, but static analysis may not be aware of this. Developed in WordPress#12020. Follow-up to r62424. Props westonruter, dmsnell. See #65342. git-svn-id: https://develop.svn.wordpress.org/trunk@62436 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ac16a49 commit 137eb30

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/wp-includes/compat.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ function _mb_ord( $string, $encoding = null ) {
249249
( ( ord( $string[3] ) & 0x3F ) )
250250
);
251251
}
252+
253+
return false;
252254
}
253255

254256
if ( ! function_exists( 'mb_substr' ) ) :

0 commit comments

Comments
 (0)