Attached patch silences a lot of errors with the adition of isset()'s and use of temporary variables.
A special note needs to be given to wp-includes/taxonomy.php, A 'return null' was replaced with a WP_Error return value, The function allready returns a WP_Error on the next line for a different error condition, so it shouldnt break any code, But it may need to be replaced with a null again.
Affected code is about line 300:
if ( empty($term) ) {
return null;
Replaced with:
if ( empty($term) ) {
$error = new WP_Error('invalid_term', __('Empty Term'));
return $error;
}
Could also be replaced with:
if ( empty($term) ) {
$error = null;
return $error;
}
(Only variables can be returned by reference, returning null or new WP_Error directly causes a notice)