If error_reporting includes Warnings, then when I save my profile ( from wp-admin/profile.php ), there is a Warning emitted before headers are sent, causing the page to whitescreen ( except for the error ) when it tries to send headers.
The warning is:
Warning: Undefined property: stdClass::$role in /var/www/html/wp-content/plugins/authorship/inc/admin.php on line 42 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/authorship/inc/admin.php:42) in /var/www/html/wp/wp-includes/pluggable.php on line 1531 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/authorship/inc/admin.php:42) in /var/www/html/wp/wp-includes/pluggable.php on line 1534
Fix, I think, is to change this:
if ( $user->role !== GUEST_ROLE ) {
return;
}
... to this:
if ( ! isset( $user->role ) || ( $user->role !== GUEST_ROLE ) ) {
return;
}
If
error_reportingincludes Warnings, then when I save my profile ( from wp-admin/profile.php ), there is a Warning emitted before headers are sent, causing the page to whitescreen ( except for the error ) when it tries to send headers.The warning is:
Fix, I think, is to change this:
... to this: