Explicitly return ref for the sake of PHP4. Fixes user_level being empty when installing on PHP4. Props Mr Pete. fixes #8317 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@10200 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-12-12 20:47:18 +00:00
parent 55216d87ac
commit cc77e573b6
2 changed files with 14 additions and 14 deletions

View File

@@ -533,7 +533,7 @@ class WP_User {
//Build $allcaps from role caps, overlay user's $caps
$this->allcaps = array();
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( $this->allcaps, $this->caps );