﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
12375	HTTP class contains redundant defined() check	TobiasBg	nacin	"Line [http://core.trac.wordpress.org/browser/trunk/wp-includes/class-http.php#L554 554 of wp-includes/class-http.php] contains a somewhat redundant logic:
{{{
if ( ! defined('WP_HTTP_BLOCK_EXTERNAL') || ( defined('WP_HTTP_BLOCK_EXTERNAL') && WP_HTTP_BLOCK_EXTERNAL == false ) )
}}}

The part after the || will only be executed if the constant is defined, thus it's overhead to check that again. Also checking constants for false (like WP_HTTP_BLOCK_EXTERNAL == false) is not good practice.

I have attached two patches, one that simply removes the redundant check and simplifies the WP_HTTP_BLOCK_EXTERNAL == false to ! WP_HTTP_BLOCK_EXTERNAL.
The second patch has the same logic, but has [http://en.wikipedia.org/wiki/De_Morgan%27s_laws De Morgan's laws] applied. I could decide what looks better :-)"	enhancement	closed	normal	3.0	HTTP		normal	fixed	has-patch commit	
