get_role triggers a PHP notice
|Reported by:||elyobo||Owned by:||ryan|
get_role (in wp-includes/capabilities.php) incorrectly returns a null value as a reference, triggering a PHP notice "Only variable references should be returned by reference".
While this is not a terribly important problem, it is easily resolved with the patch attached (just assign the value to a variable first, then return that).
This is a more important issue for us because we develop using a custom error handler which throws ErrorExceptions on all notices. This helps to catch a range of PHP errors (e.g. typos, uninitialised variables and whatnot), but is sometimes a PITA because of things like this.