WordPress.org

Make WordPress Core

Ticket #21526: 21526-post_capabilities_array_merge.patch

File 21526-post_capabilities_array_merge.patch, 557 bytes (added by wpsmith, 6 years ago)
  • wp-includes/post.php

     
    11801180                $default_capabilities = array_merge( $default_capabilities, $default_capabilities_for_mapping );
    11811181        }
    11821182
    1183         $capabilities = array_merge( $default_capabilities, $args->capabilities );
     1183        $capabilities = array_merge( $default_capabilities, (array)$args->capabilities );
    11841184
    11851185        // Remember meta capabilities for future reference.
    11861186        if ( $args->map_meta_cap )