<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14361] trunk:
Prevent fatal error when falling back to fsockopen in the setup-config.
php key/salt HTTP request.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14361">14361</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-03 06:28:05 +0000 (Mon, 03 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Prevent fatal error when falling back to fsockopen in the setup-config.php key/salt HTTP request. fixes <a href="http://trac.wordpress.org/ticket/13030">#13030</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminsetupconfigphp">trunk/wp-admin/setup-config.php</a></li>
<li><a href="#trunkwpincludesclasshttpphp">trunk/wp-includes/class-http.php</a></li>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminsetupconfigphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/setup-config.php (14360 => 14361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/setup-config.php        2010-05-03 05:49:19 UTC (rev 14360)
+++ trunk/wp-admin/setup-config.php        2010-05-03 06:28:05 UTC (rev 14361)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> *
</span><span class="cx"> * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
</span><span class="cx"> */
</span><del>-error_reporting(0);
</del><ins>+error_reporting(E_ALL &~ E_DEPRECATED);
</ins><span class="cx">
</span><span class="cx"> /**#@+
</span><span class="cx"> * These three defines are required to allow us to use require_wp_db() to load
</span></span></pre></div>
<a id="trunkwpincludesclasshttpphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-http.php (14360 => 14361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-http.php        2010-05-03 05:49:19 UTC (rev 14360)
+++ trunk/wp-includes/class-http.php        2010-05-03 06:28:05 UTC (rev 14361)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">                 static $working_transport, $blocking_transport, $nonblocking_transport;
</span><span class="cx">
</span><span class="cx">                 if ( is_null($working_transport) ) {
</span><del>-                        if ( true === WP_Http_ExtHttp::test($args) ) {
</del><ins>+                        /* if ( true === WP_Http_ExtHttp::test($args) ) {
</ins><span class="cx">                                 $working_transport['exthttp'] = new WP_Http_ExtHttp();
</span><span class="cx">                                 $blocking_transport[] = &$working_transport['exthttp'];
</span><span class="cx">                         } else if ( true === WP_Http_Curl::test($args) ) {
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">                         } else if ( true === WP_Http_Fopen::test($args) ) {
</span><span class="cx">                                 $working_transport['fopen'] = new WP_Http_Fopen();
</span><span class="cx">                                 $blocking_transport[] = &$working_transport['fopen'];
</span><del>-                        } else if ( true === WP_Http_Fsockopen::test($args) ) {
</del><ins>+                        } else */ if ( true === WP_Http_Fsockopen::test($args) ) {
</ins><span class="cx">                                 $working_transport['fsockopen'] = new WP_Http_Fsockopen();
</span><span class="cx">                                 $blocking_transport[] = &$working_transport['fsockopen'];
</span><span class="cx">                         }
</span></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (14360 => 14361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2010-05-03 05:49:19 UTC (rev 14360)
+++ trunk/wp-includes/functions.php        2010-05-03 06:28:05 UTC (rev 14361)
</span><span class="lines">@@ -316,6 +316,9 @@
</span><span class="cx">         if ( empty($option) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><ins>+        if ( defined( 'WP_SETUP_CONFIG' ) )
+                return false;
+
</ins><span class="cx">         // prevent non-existent options from triggering multiple queries
</span><span class="cx">         if ( defined( 'WP_INSTALLING' ) && is_multisite() ) {
</span><span class="cx">                 $notoptions = array();
</span></span></pre>
</div>
</div>
</body>
</html>