WordPress.org

Make WordPress Core

Ticket #9128: 9128.diff

File 9128.diff, 663 bytes (added by Denis-de-Bernardy, 5 years ago)
  • wp-includes/capabilities.php

     
    534534                $this->allcaps = array(); 
    535535                foreach ( (array) $this->roles as $role ) { 
    536536                        $role =& $wp_roles->get_role( $role ); 
    537                         $this->allcaps = array_merge( $this->allcaps, $role->capabilities ); 
     537                        $this->allcaps = array_merge( (array) $this->allcaps, (array) $role->capabilities ); 
    538538                } 
    539                 $this->allcaps = array_merge( $this->allcaps, $this->caps ); 
     539                $this->allcaps = array_merge( (array) $this->allcaps, (array) $this->caps ); 
    540540        } 
    541541 
    542542        /**