Skip to content

Commit 353b042

Browse files
General: Return processed array values early in wp_slash().
This is a micro-optimization to avoid an unnecessary `is_string()` check. Follow-up to [23555], [48433]. Props dilipbheda, audrasjb, staurand, rollybueno, psykro, westonruter, SergeyBiryukov. Fixes #63211. git-svn-id: https://develop.svn.wordpress.org/trunk@61103 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ddf8046 commit 353b042

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/formatting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5785,7 +5785,7 @@ function sanitize_trackback_urls( $to_ping ) {
57855785
*/
57865786
function wp_slash( $value ) {
57875787
if ( is_array( $value ) ) {
5788-
$value = array_map( 'wp_slash', $value );
5788+
return array_map( 'wp_slash', $value );
57895789
}
57905790

57915791
if ( is_string( $value ) ) {

0 commit comments

Comments
 (0)