Make WordPress Core


Ignore:
Timestamp:
09/14/2015 01:22:23 AM (11 years ago)
Author:
wonderboymusic
Message:

Objects are passed by-reference since PHP 5. In _get_custom_object_labels(), cast $object->labels back to object before returning. This function is weird.

Adds unit test.

Props Toro_Unit.
Fixes #33023.

File:
1 edited

Legend:

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

    r34100 r34102  
    13941394        }
    13951395        $labels = array_merge( $defaults, $object->labels );
     1396        $object->labels = (object) $object->labels;
     1397       
    13961398        return (object) $labels;
    13971399}
Note: See TracChangeset for help on using the changeset viewer.