bugfix: array_shift() altering a global var

When cache is enabled (W3TC plugin) the global var $current_user->roles was altered by array_shift().