[wp-hackers] Hotfix for wp-includes/functions.php

Roland Haeder webmaster at mxchange.org
Wed Sep 20 17:56:14 GMT 2006


And here comes another one:

The same include file again:

Replace is_feed() with this snippet to reduce another notice:

//--------- HOTFIX - 09/20/2006-19:52 -------
function is_feed () {
     global $wp_query;

     if (isset($wp_query->is_feed)) {
          return $wp_query->is_feed;
     } else {
          return false;
     }
}
//--------- HOTFIX - 09/20/2006-19:52 -------

The reason why I'm fixing notices is simple: The PHP interpreter is generating 
a notice when e.g. an undefined variable will be used in an if() container or 
in an addition like:

$target .= $undefined1.$undefined2;

All these must be handled by the interpreter and this is time-consuming and 
uninitialized variables *can* be used for attacks when register_globals is 
on.

I have found many many other notices in core functions. May I send you a link 
to my patch which you can download and (hopefully!) include in your next 
release?

Best wishes,
Roland


More information about the wp-hackers mailing list