Cast to array to fix warning. Props johnkolbert, Denis-de-Bernardy. fixes #9128

git-svn-id: https://develop.svn.wordpress.org/trunk@11019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-20 20:03:20 +00:00
parent 3d3d56b538
commit 66ab91564b
1 changed files with 2 additions and 2 deletions

View File

@ -534,9 +534,9 @@ class WP_User {
$this->allcaps = array(); $this->allcaps = array();
foreach ( (array) $this->roles as $role ) { foreach ( (array) $this->roles as $role ) {
$role =& $wp_roles->get_role( $role ); $role =& $wp_roles->get_role( $role );
$this->allcaps = array_merge( $this->allcaps, $role->capabilities ); $this->allcaps = array_merge( (array) $this->allcaps, (array) $role->capabilities );
} }
$this->allcaps = array_merge( $this->allcaps, $this->caps ); $this->allcaps = array_merge( (array) $this->allcaps, (array) $this->caps );
} }
/** /**