Make WordPress Core

Changeset 61103


Ignore:
Timestamp:
10/31/2025 12:31:42 PM (13 days ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r61061 r61103  
    57865786function wp_slash( $value ) {
    57875787    if ( is_array( $value ) ) {
    5788         $value = array_map( 'wp_slash', $value );
     5788        return array_map( 'wp_slash', $value );
    57895789    }
    57905790
Note: See TracChangeset for help on using the changeset viewer.