Make WordPress Core

Changeset 48440


Ignore:
Timestamp:
07/11/2020 10:42:35 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Bootstrap/Load: Adjust the logic in add_magic_quotes() for better readability.

Follow-up to [48205].

See #48605.

File:
1 edited

Legend:

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

    r48369 r48440  
    12311231        if ( is_array( $v ) ) {
    12321232            $array[ $k ] = add_magic_quotes( $v );
    1233         } elseif ( ! is_string( $v ) ) {
     1233        } elseif ( is_string( $v ) ) {
     1234            $array[ $k ] = addslashes( $v );
     1235        } else {
    12341236            continue;
    1235         } else {
    1236             $array[ $k ] = addslashes( $v );
    12371237        }
    12381238    }
Note: See TracChangeset for help on using the changeset viewer.