WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/06/2011 05:44:29 PM (9 years ago)
Author:
ryan
Message:

Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813

File:
1 edited

Legend:

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

    r17603 r17613  
    510510
    511511    if ( is_object($newvalue) )
    512         $newvalue = wp_clone($newvalue);
     512        $newvalue = clone $newvalue;
    513513
    514514    $newvalue = sanitize_option( $option, $newvalue );
     
    591591    wp_protect_special_option( $option );
    592592
     593    /*
     594     * FIXME the next two lines of code are not necessary and should be removed.
     595     * @see http://core.trac.wordpress.org/ticket/13480
     596     */
    593597    if ( is_object($value) )
    594         $value = wp_clone($value);
     598        $value = clone $value;
    595599
    596600    $value = sanitize_option( $option, $value );
Note: See TracChangeset for help on using the changeset viewer.