<!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" />
<title>[45611] trunk: Coding Standards: Fix instances of `WordPress.PHP.NoSilencedErrors.Discouraged`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/45611">45611</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/45611","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>pento</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-07-09 05:44:42 +0000 (Tue, 09 Jul 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Coding Standards: Fix instances of `WordPress.PHP.NoSilencedErrors.Discouraged`.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.
See <a href="https://core.trac.wordpress.org/ticket/46732">#46732</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkphpcsxmldist">trunk/phpcs.xml.dist</a></li>
<li><a href="#trunksrcwpadminadminajaxphp">trunk/src/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunksrcwpadminadminheaderphp">trunk/src/wp-admin/admin-header.php</a></li>
<li><a href="#trunksrcwpadmincustomheaderphp">trunk/src/wp-admin/custom-header.php</a></li>
<li><a href="#trunksrcwpadmincustomizephp">trunk/src/wp-admin/customize.php</a></li>
<li><a href="#trunksrcwpadminincludesajaxactionsphp">trunk/src/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpfilesystemdirectphp">trunk/src/wp-admin/includes/class-wp-filesystem-direct.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpfilesystemftpextphp">trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpfilesystemftpsocketsphp">trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpfilesystemssh2php">trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpupgraderphp">trunk/src/wp-admin/includes/class-wp-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesfilephp">trunk/src/wp-admin/includes/file.php</a></li>
<li><a href="#trunksrcwpadminincludesimagephp">trunk/src/wp-admin/includes/image.php</a></li>
<li><a href="#trunksrcwpadminincludespluginphp">trunk/src/wp-admin/includes/plugin.php</a></li>
<li><a href="#trunksrcwpadminincludestemplatephp">trunk/src/wp-admin/includes/template.php</a></li>
<li><a href="#trunksrcwpadminincludesupdatecorephp">trunk/src/wp-admin/includes/update-core.php</a></li>
<li><a href="#trunksrcwpadminincludesupgradephp">trunk/src/wp-admin/includes/upgrade.php</a></li>
<li><a href="#trunksrcwpadminmediauploadphp">trunk/src/wp-admin/media-upload.php</a></li>
<li><a href="#trunksrcwpadminpluginsphp">trunk/src/wp-admin/plugins.php</a></li>
<li><a href="#trunksrcwpadminupdatephp">trunk/src/wp-admin/update.php</a></li>
<li><a href="#trunksrcwpadminupgradephp">trunk/src/wp-admin/upgrade.php</a></li>
<li><a href="#trunksrcwpincludesclasswpdependencyphp">trunk/src/wp-includes/class-wp-dependency.php</a></li>
<li><a href="#trunksrcwpincludesclasswphttpstreamsphp">trunk/src/wp-includes/class-wp-http-streams.php</a></li>
<li><a href="#trunksrcwpincludesclasswpimageeditorgdphp">trunk/src/wp-includes/class-wp-image-editor-gd.php</a></li>
<li><a href="#trunksrcwpincludesclasswpimageeditorimagickphp">trunk/src/wp-includes/class-wp-image-editor-imagick.php</a></li>
<li><a href="#trunksrcwpincludesclasswpphp">trunk/src/wp-includes/class-wp.php</a></li>
<li><a href="#trunksrcwpincludescommentphp">trunk/src/wp-includes/comment.php</a></li>
<li><a href="#trunksrcwpincludescompatphp">trunk/src/wp-includes/compat.php</a></li>
<li><a href="#trunksrcwpincludescronphp">trunk/src/wp-includes/cron.php</a></li>
<li><a href="#trunksrcwpincludesdefaultconstantsphp">trunk/src/wp-includes/default-constants.php</a></li>
<li><a href="#trunksrcwpincludesdeprecatedphp">trunk/src/wp-includes/deprecated.php</a></li>
<li><a href="#trunksrcwpincludesfeedphp">trunk/src/wp-includes/feed.php</a></li>
<li><a href="#trunksrcwpincludesformattingphp">trunk/src/wp-includes/formatting.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludeshttpphp">trunk/src/wp-includes/http.php</a></li>
<li><a href="#trunksrcwpincludesloadphp">trunk/src/wp-includes/load.php</a></li>
<li><a href="#trunksrcwpincludesmediaphp">trunk/src/wp-includes/media.php</a></li>
<li><a href="#trunksrcwpincludespluggablephp">trunk/src/wp-includes/pluggable.php</a></li>
<li><a href="#trunksrcwpincludesrestapiclasswprestserverphp">trunk/src/wp-includes/rest-api/class-wp-rest-server.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetrssphp">trunk/src/wp-includes/widgets/class-wp-widget-rss.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgettextphp">trunk/src/wp-includes/widgets/class-wp-widget-text.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsphp">trunk/src/wp-includes/widgets.php</a></li>
<li><a href="#trunksrcwpincludeswpdbphp">trunk/src/wp-includes/wp-db.php</a></li>
<li><a href="#trunksrcwpsettingsphp">trunk/src/wp-settings.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkphpcsxmldist"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/phpcs.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/phpcs.xml.dist 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/phpcs.xml.dist 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -221,6 +221,27 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </properties>
</span><span class="cx" style="display: block; padding: 0 10px"> </rule>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <rule ref="WordPress.PHP.NoSilencedErrors">
+ <properties>
+ <property name="custom_whitelist" type="array">
+ <element value="ssh2_connect"/>
+ <element value="ssh2_auth_password"/>
+ <element value="ssh2_auth_pubkey_file"/>
+ <element value="ftp_ssl_connect"/>
+ <element value="ftp_connect"/>
+ <element value="ftp_get_option"/>
+ <element value="ftp_set_option"/>
+ <element value="disk_free_space"/>
+ <element value="getimagesize"/>
+ <element value="iptcparse"/>
+ <element value="exif_read_data"/>
+ <element value="gzinflate"/>
+ <element value="gzuncompress"/>
+ <element value="gzdecode"/>
+ </property>
+ </properties>
+ </rule>
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <!-- Assignments in while conditions are a valid method of looping over iterables -->
</span><span class="cx" style="display: block; padding: 0 10px"> <rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition">
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>*</exclude-pattern>
</span></span></pre></div>
<a id="trunksrcwpadminadminajaxphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/admin-ajax.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/admin-ajax.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/admin-ajax.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,8 +35,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** Load Ajax Handlers for WordPress Core */
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
-@header( 'X-Robots-Tag: noindex' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
+header( 'X-Robots-Tag: noindex' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> send_nosniff_header();
</span><span class="cx" style="display: block; padding: 0 10px"> nocache_headers();
</span></span></pre></div>
<a id="trunksrcwpadminadminheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/admin-header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/admin-header.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/admin-header.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,7 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @subpackage Administration
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! defined( 'WP_ADMIN' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( dirname( __FILE__ ) . '/admin.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadmincustomheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/custom-header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/custom-header.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/custom-header.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -778,7 +778,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( file_exists( $file ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- list( $width, $height, $type, $attr ) = getimagesize( $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ list( $width, $height, $type, $attr ) = @getimagesize( $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = wp_get_attachment_metadata( $attachment_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $height = isset( $data['height'] ) ? $data['height'] : 0;
</span></span></pre></div>
<a id="trunksrcwpadmincustomizephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/customize.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/customize.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/customize.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,7 +123,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'customize_controls_enqueue_scripts' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Let's roll.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_user_settings();
</span><span class="cx" style="display: block; padding: 0 10px"> _wp_admin_html_begin();
</span></span></pre></div>
<a id="trunksrcwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/ajax-actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ajax-actions.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/ajax-actions.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3251,7 +3251,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $return = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @set_time_limit( 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ set_time_limit( 0 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $_REQUEST['compare'] as $compare_key ) {
</span><span class="cx" style="display: block; padding: 0 10px"> list( $compare_from, $compare_to ) = explode( ':', $compare_key ); // from:to
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpfilesystemdirectphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-filesystem-direct.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-filesystem-direct.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/class-wp-filesystem-direct.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,7 +95,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false The current working directory on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function cwd() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @getcwd();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return getcwd();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,10 +126,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $recursive ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @chgrp( $file, $group );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return chgrp( $file, $group );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $this->is_dir( $file ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @chgrp( $file, $group );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return chgrp( $file, $group );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // Is a directory, and we want recursive
</span><span class="cx" style="display: block; padding: 0 10px"> $file = trailingslashit( $file );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -165,7 +165,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $recursive || ! $this->is_dir( $file ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @chmod( $file, $mode );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return chmod( $file, $mode );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // Is a directory, and we want recursive
</span><span class="cx" style="display: block; padding: 0 10px"> $file = trailingslashit( $file );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -193,10 +193,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $recursive ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @chown( $file, $owner );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return chown( $file, $owner );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $this->is_dir( $file ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @chown( $file, $owner );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return chown( $file, $owner );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // Is a directory, and we want recursive
</span><span class="cx" style="display: block; padding: 0 10px"> $filelist = $this->dirlist( $file );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -476,7 +476,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $atime == 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $atime = time();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @touch( $file, $time, $atime );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return touch( $file, $time, $atime );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -564,11 +564,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $limit_file = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $this->is_dir( $path ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $this->is_dir( $path ) || ! $this->is_readable( $dir ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $dir = @dir( $path );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $dir = dir( $path );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $dir ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpfilesystemftpextphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,7 +114,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set the Connection to use Passive FTP
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ftp_pasv( $this->link, true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ftp_pasv( $this->link, true );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( @ftp_get_option( $this->link, FTP_TIMEOUT_SEC ) < FS_TIMEOUT ) {
</span><span class="cx" style="display: block; padding: 0 10px"> @ftp_set_option( $this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,7 +140,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> fclose( $temp );
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( $tempfile );
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -205,7 +205,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> fseek( $temp, 0 ); // Skip back to the start of the file being written to
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ret = @ftp_fput( $this->link, $file, $temp, FTP_BINARY );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ret = ftp_fput( $this->link, $file, $temp, FTP_BINARY );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> fclose( $temp );
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( $tempfile );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +223,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false The current working directory on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function cwd() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $cwd = @ftp_pwd( $this->link );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cwd = ftp_pwd( $this->link );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $cwd ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $cwd = trailingslashit( $cwd );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -275,9 +275,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // chmod the file or directory
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'ftp_chmod' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return (bool) @ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return (bool) ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return (bool) @ftp_chmod( $this->link, $mode, $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return (bool) ftp_chmod( $this->link, $mode, $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -375,10 +375,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'f' == $type || $this->is_file( $file ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @ftp_delete( $this->link, $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return ftp_delete( $this->link, $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $recursive ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @ftp_rmdir( $this->link, $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return ftp_rmdir( $this->link, $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $filelist = $this->dirlist( trailingslashit( $file ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -387,7 +387,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->delete( trailingslashit( $file ) . $delete_file['name'], $recursive, $delete_file['type'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @ftp_rmdir( $this->link, $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return ftp_rmdir( $this->link, $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -399,7 +399,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool Whether $file exists or not.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function exists( $file ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $list = @ftp_nlist( $this->link, $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $list = ftp_nlist( $this->link, $file );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $list ) && $this->is_dir( $file ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return true; // File is an empty directory.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -536,7 +536,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @ftp_mkdir( $this->link, $path ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! ftp_mkdir( $this->link, $path ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $this->chmod( $path, $chmod );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -587,7 +587,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $b['year'] = $lucifer[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $b['hour'] = $lucifer[4];
</span><span class="cx" style="display: block; padding: 0 10px"> $b['minute'] = $lucifer[5];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $b['time'] = @mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $b['am/pm'] = $lucifer[6];
</span><span class="cx" style="display: block; padding: 0 10px"> $b['name'] = $lucifer[8];
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( ! $is_windows ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -617,7 +617,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $lcount == 8 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] );
</span><span class="cx" style="display: block; padding: 0 10px"> sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $b['time'] = @mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $b['time'] = mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $b['name'] = $lucifer[7];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $b['month'] = $lucifer[5];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -678,11 +678,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $limit_file = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $pwd = @ftp_pwd( $this->link );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pwd = ftp_pwd( $this->link );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! @ftp_chdir( $this->link, $path ) ) { // Can't change to folder = folder doesn't exist.
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $list = @ftp_rawlist( $this->link, '-a', false );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $list = ftp_rawlist( $this->link, '-a', false );
</ins><span class="cx" style="display: block; padding: 0 10px"> @ftp_chdir( $this->link, $pwd );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $list ) ) { // Empty array = non-existent folder (real folder will show . at least).
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpfilesystemftpsocketsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->errors = new WP_Error();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check if possible to use ftp functions.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $this->ftp = new ftp();
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpfilesystemssh2php"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -484,7 +484,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function move( $source, $destination, $overwrite = false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return @ssh2_sftp_rename( $this->sftp_link, $source, $destination );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $this->exists( $destination ) ) {
+ if ( $overwrite ) {
+ // We need to remove the destination file before we can rename the source.
+ $this->delete( $destination, false, 'f' );
+ } else {
+ // If we're not overwriting, the rename will fail, so return early.
+ return false;
+ }
+ }
+
+ return ssh2_sftp_rename( $this->sftp_link, $source, $destination );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -711,12 +721,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $limit_file = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $this->is_dir( $path ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $this->is_dir( $path ) || ! $this->is_readable( $path ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ret = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $dir = @dir( $this->sftp_path( $path ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $dir = dir( $this->sftp_path( $path ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $dir ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpupgraderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-upgrader.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/class-wp-upgrader.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -465,7 +465,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $destination = $args['destination'];
</span><span class="cx" style="display: block; padding: 0 10px"> $clear_destination = $args['clear_destination'];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @set_time_limit( 300 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ set_time_limit( 300 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $source ) || empty( $destination ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'bad_request', $this->strings['bad_request'] );
</span></span></pre></div>
<a id="trunksrcwpadminincludesfilephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/file.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/file.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/file.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -165,8 +165,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $files[] = $folder . $file;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ closedir( $dir );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @closedir( $dir );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $files;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -514,7 +515,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure PHP process doesn't die before loopback requests complete.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @set_time_limit( 300 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ set_time_limit( 300 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Time to wait for loopback requests to finish.
</span><span class="cx" style="display: block; padding: 0 10px"> $timeout = 100;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -780,7 +781,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // A properly uploaded file will pass this test. There should be no reason to override this one.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_readable( $file['tmp_name'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $test_uploaded_file = 'wp_handle_upload' === $action ? is_uploaded_file( $file['tmp_name'] ) : @is_readable( $file['tmp_name'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $test_uploaded_file ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return call_user_func_array( $upload_error_handler, array( &$file, __( 'Specified file failed upload test.' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -848,10 +849,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( null === $move_new_file ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'wp_handle_upload' === $action ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $move_new_file = @ move_uploaded_file( $file['tmp_name'], $new_file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $move_new_file = @move_uploaded_file( $file['tmp_name'], $new_file );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // use copy and unlink because rename breaks streams.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $move_new_file = @ copy( $file['tmp_name'], $new_file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
+ $move_new_file = @copy( $file['tmp_name'], $new_file );
</ins><span class="cx" style="display: block; padding: 0 10px"> unlink( $file['tmp_name'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -868,7 +870,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set correct file permissions.
</span><span class="cx" style="display: block; padding: 0 10px"> $stat = stat( dirname( $new_file ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $perms = $stat['mode'] & 0000666;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ chmod( $new_file, $perms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ chmod( $new_file, $perms );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Compute the URL.
</span><span class="cx" style="display: block; padding: 0 10px"> $url = $uploads['url'] . "/$filename";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1854,7 +1856,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @fclose( $temp_handle );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ fclose( $temp_handle );
</ins><span class="cx" style="display: block; padding: 0 10px"> @unlink( $temp_file_name );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesimagephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/image.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/image.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/image.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -163,7 +163,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_create_image_subsizes( $file, $image_meta, $attachment_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $image_meta ) || ! isset( $image_meta['width'], $image_meta['height'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // New uploaded image.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $imagesize = getimagesize( $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $imagesize = @getimagesize( $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> $image_meta['width'] = $imagesize[0];
</span><span class="cx" style="display: block; padding: 0 10px"> $image_meta['height'] = $imagesize[1];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -450,7 +450,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int|float
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_exif_frac2dec( $str ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @list( $n, $d ) = explode( '/', $str );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( false === strpos( $str, '/' ) ) {
+ return $str;
+ }
+
+ list( $n, $d ) = explode( '/', $str );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $d ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $n / $d;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -466,8 +470,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_exif_date2ts( $str ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @list( $date, $time ) = explode( ' ', trim( $str ) );
- @list( $y, $m, $d ) = explode( ':', $date );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ list( $date, $time ) = explode( ' ', trim( $str ) );
+ list( $y, $m, $d ) = explode( ':', $date );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return strtotime( "{$y}-{$m}-{$d} {$time}" );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -863,7 +867,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> wp_mkdir_p( dirname( $dst_file ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @copy( $src_file, $dst_file ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! copy( $src_file, $dst_file ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $dst_file = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpadminincludespluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/plugin.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/plugin.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -376,7 +376,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $wp_plugins;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @closedir( $plugins_dir );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ closedir( $plugins_dir );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $plugin_files ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $wp_plugins;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -444,7 +444,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $dropins;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @closedir( $plugins_dir );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ closedir( $plugins_dir );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $plugin_files ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $dropins;
</span></span></pre></div>
<a id="trunksrcwpadminincludestemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/template.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/template.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1901,7 +1901,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $current_screen = get_current_screen();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> _wp_admin_html_begin();
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?> — <?php _e( 'WordPress' ); ?></title>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2324,7 +2324,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $is_IE ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( 'X-UA-Compatible: IE=edge' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header( 'X-UA-Compatible: IE=edge' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="trunksrcwpadminincludesupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/update-core.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/update-core.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -881,7 +881,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function update_core( $from, $to ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @set_time_limit( 300 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ set_time_limit( 300 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters feedback messages displayed during the core update process.
</span></span></pre></div>
<a id="trunksrcwpadminincludesupgradephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/upgrade.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/upgrade.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/includes/upgrade.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -608,7 +608,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $login_url
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @wp_mail( $email, __( 'New WordPress Site' ), $message );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_mail( $email, __( 'New WordPress Site' ), $message );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2969,7 +2969,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $oldfile == 'index.php' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $index = implode( '', file( "$oldpath/$oldfile" ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( strpos( $index, 'WP_USE_THEMES' ) !== false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2978,7 +2978,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @copy( "$oldpath/$oldfile", "$site_dir/$newfile" ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! copy( "$oldpath/$oldfile", "$site_dir/$newfile" ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3039,19 +3039,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Copy files from the default theme to the site theme.
</span><span class="cx" style="display: block; padding: 0 10px"> //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $theme_dir = @ opendir( $default_dir );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $theme_dir = @opendir( $default_dir );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $theme_dir ) {
</span><span class="cx" style="display: block; padding: 0 10px"> while ( ( $theme_file = readdir( $theme_dir ) ) !== false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_dir( "$default_dir/$theme_file" ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @copy( "$default_dir/$theme_file", "$site_dir/$theme_file" ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! copy( "$default_dir/$theme_file", "$site_dir/$theme_file" ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> chmod( "$site_dir/$theme_file", 0777 );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ closedir( $theme_dir );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @closedir( $theme_dir );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Rewrite the theme header.
</span><span class="cx" style="display: block; padding: 0 10px"> $stylelines = explode( "\n", implode( '', file( "$site_dir/style.css" ) ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3081,19 +3082,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $images_dir = @ opendir( "$default_dir/images" );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $images_dir = @opendir( "$default_dir/images" );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $images_dir ) {
</span><span class="cx" style="display: block; padding: 0 10px"> while ( ( $image = readdir( $images_dir ) ) !== false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_dir( "$default_dir/images/$image" ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @copy( "$default_dir/images/$image", "$site_dir/images/$image" ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! copy( "$default_dir/images/$image", "$site_dir/images/$image" ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> chmod( "$site_dir/images/$image", 0777 );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ closedir( $images_dir );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @closedir( $images_dir );
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpadminmediauploadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/media-upload.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/media-upload.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/media-upload.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,7 +26,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_style( 'imgareaselect' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'media-gallery' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // IDs should be integers
</span><span class="cx" style="display: block; padding: 0 10px"> $ID = isset( $ID ) ? (int) $ID : 0;
</span></span></pre></div>
<a id="trunksrcwpadminpluginsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/plugins.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/plugins.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/plugins.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +170,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
</ins><span class="cx" style="display: block; padding: 0 10px"> // Go back to "sandbox" scope so we get the same errors as before
</span><span class="cx" style="display: block; padding: 0 10px"> plugin_sandbox_scrape( $plugin );
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-admin/includes/plugin.php */
</span></span></pre></div>
<a id="trunksrcwpadminupdatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/update.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/update.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/update.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -91,7 +91,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<p>' . __( 'Plugin failed to reactivate due to a fatal error.' ) . '</p>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
</span><span class="cx" style="display: block; padding: 0 10px"> include( WP_PLUGIN_DIR . '/' . $plugin );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminupgradephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/upgrade.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/upgrade.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-admin/upgrade.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,7 +54,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <!DOCTYPE html>
</span><span class="cx" style="display: block; padding: 0 10px"> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpdependencyphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-dependency.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-dependency.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/class-wp-dependency.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,7 +89,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $this->deps ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->deps = array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesclasswphttpstreamsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-http-streams.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-http-streams.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/class-wp-http-streams.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,8 +140,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> $handle = @stream_socket_client( 'tcp://' . $proxy->host() . ':' . $proxy->port(), $connection_error, $connection_error_str, $connect_timeout, STREAM_CLIENT_CONNECT, $context );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> $handle = @stream_socket_client( $connect_host . ':' . $arrURL['port'], $connection_error, $connection_error_str, $connect_timeout, STREAM_CLIENT_CONNECT, $context );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpimageeditorgdphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-image-editor-gd.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-image-editor-gd.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/class-wp-image-editor-gd.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -436,7 +436,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set correct file permissions
</span><span class="cx" style="display: block; padding: 0 10px"> $stat = stat( dirname( $filename ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ chmod( $filename, $perms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ chmod( $filename, $perms );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the name of the saved image file.
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpimageeditorimagickphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-image-editor-imagick.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-image-editor-imagick.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/class-wp-image-editor-imagick.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,6 +113,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> try {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> return ( (bool) @Imagick::queryFormats( $imagick_extension ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } catch ( Exception $e ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -654,7 +655,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set correct file permissions
</span><span class="cx" style="display: block; padding: 0 10px"> $stat = stat( dirname( $filename ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ chmod( $filename, $perms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ chmod( $filename, $perms );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/class-wp-image-editor-gd.php */
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/class-wp.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -492,23 +492,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $headers['Last-Modified'] ) && false === $headers['Last-Modified'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $headers['Last-Modified'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // In PHP 5.3+, make sure we are not sending a Last-Modified header.
- if ( function_exists( 'header_remove' ) ) {
- @header_remove( 'Last-Modified' );
- } else {
- // In PHP 5.2, send an empty Last-Modified header, but only as a
- // last resort to override a header already sent. #WP23021
- foreach ( headers_list() as $header ) {
- if ( 0 === stripos( $header, 'Last-Modified' ) ) {
- $headers['Last-Modified'] = '';
- break;
- }
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! headers_sent() ) {
+ header_remove( 'Last-Modified' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- foreach ( (array) $headers as $name => $field_value ) {
- @header( "{$name}: {$field_value}" );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! headers_sent() ) {
+ foreach ( (array) $headers as $name => $field_value ) {
+ header( "{$name}: {$field_value}" );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $exit_required ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -674,8 +666,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Only set X-Pingback for single posts that allow pings.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $p && pings_open( $p ) ) {
- @header( 'X-Pingback: ' . get_bloginfo( 'pingback_url', 'display' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $p && pings_open( $p ) && ! headers_sent() ) {
+ header( 'X-Pingback: ' . get_bloginfo( 'pingback_url', 'display' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // check for paged content that exceeds the max number of pages
</span></span></pre></div>
<a id="trunksrcwpincludescommentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/comment.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2608,9 +2608,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $pingback_link_offset_dquote || $pingback_link_offset_squote ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $quote = ( $pingback_link_offset_dquote ) ? '"' : '\'';
</span><span class="cx" style="display: block; padding: 0 10px"> $pingback_link_offset = ( $quote == '"' ) ? $pingback_link_offset_dquote : $pingback_link_offset_squote;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $pingback_href_pos = @strpos( $contents, 'href=', $pingback_link_offset );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pingback_href_pos = strpos( $contents, 'href=', $pingback_link_offset );
</ins><span class="cx" style="display: block; padding: 0 10px"> $pingback_href_start = $pingback_href_pos + 6;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $pingback_href_end = @strpos( $contents, $quote, $pingback_href_start );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pingback_href_end = strpos( $contents, $quote, $pingback_href_start );
</ins><span class="cx" style="display: block; padding: 0 10px"> $pingback_server_url_len = $pingback_href_end - $pingback_href_start;
</span><span class="cx" style="display: block; padding: 0 10px"> $pingback_server_url = substr( $contents, $pingback_href_start, $pingback_server_url_len );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2808,7 +2808,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $pingback_server_url ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ set_time_limit( 60 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ set_time_limit( 60 );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Now, the RPC call
</span><span class="cx" style="display: block; padding: 0 10px"> $pagelinkedfrom = get_permalink( $post );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludescompatphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/compat.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/compat.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/compat.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,6 +35,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'reset' === $utf8_pcre ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- intentional error generated to detect PCRE/u support.
</ins><span class="cx" style="display: block; padding: 0 10px"> $utf8_pcre = @preg_match( '/^./u', 'a' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludescronphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/cron.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/cron.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -677,11 +677,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo ' ';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // flush any buffers and send the headers
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- while ( @ob_end_flush() ) {
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_ob_end_flush_all();
</ins><span class="cx" style="display: block; padding: 0 10px"> flush();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- WP_DEBUG ? include_once( ABSPATH . 'wp-cron.php' ) : @include_once( ABSPATH . 'wp-cron.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ include_once( ABSPATH . 'wp-cron.php' );
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesdefaultconstantsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/default-constants.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/default-constants.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/default-constants.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,7 +34,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> define( 'WP_START_TIMESTAMP', microtime( true ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $current_limit = @ini_get( 'memory_limit' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $current_limit = ini_get( 'memory_limit' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $current_limit_int = wp_convert_hr_to_bytes( $current_limit );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Define memory limits.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +61,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set memory limits.
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_limit_int = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( -1 !== $current_limit_int && ( -1 === $wp_limit_int || $wp_limit_int > $current_limit_int ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ini_set( 'memory_limit', WP_MEMORY_LIMIT );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ini_set( 'memory_limit', WP_MEMORY_LIMIT );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $blog_id ) ) {
</span></span></pre></div>
<a id="trunksrcwpincludesdeprecatedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/deprecated.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/deprecated.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/deprecated.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1923,7 +1923,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Do we need to constrain the image?
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ($max_dims = apply_filters('attachment_max_dims', $max_dims)) && file_exists($src_file) ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $imagesize = getimagesize($src_file);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $imagesize = @getimagesize($src_file);
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if (($imagesize[0] > $max_dims[0]) || $imagesize[1] > $max_dims[1] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $actual_aspect = $imagesize[0] / $imagesize[1];
</span></span></pre></div>
<a id="trunksrcwpincludesfeedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/feed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/feed.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/feed.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -407,7 +407,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'atom' == $type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', esc_attr( get_bloginfo_rss( 'url' ) ), esc_attr( $cat_name ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $the_list .= "\t\t<category><![CDATA[" . @html_entity_decode( $cat_name, ENT_COMPAT, get_option( 'blog_charset' ) ) . "]]></category>\n";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $the_list .= "\t\t<category><![CDATA[" . html_entity_decode( $cat_name, ENT_COMPAT, get_option( 'blog_charset' ) ) . "]]></category>\n";
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesformattingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/formatting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/formatting.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/formatting.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -994,7 +994,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $string = wp_kses_normalize_entities( $string );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $string = @htmlspecialchars( $string, $quote_style, $charset, $double_encode );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $string = htmlspecialchars( $string, $quote_style, $charset, $double_encode );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Back-compat.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'single' === $_quote_style ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1129,6 +1129,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Check for support for utf8 in the installed PCRE library once and store the result in a static
</span><span class="cx" style="display: block; padding: 0 10px"> static $utf8_pcre = null;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $utf8_pcre ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> $utf8_pcre = @preg_match( '/^./u', 'a' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // We can't demand utf8 in the PCRE installation, so just return the string in those cases
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1136,7 +1137,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $string;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // preg_match fails when it encounters invalid UTF8 in $string
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- preg_match fails when it encounters invalid UTF8 in $string
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 1 === @preg_match( '/^./us', $string ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $string;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/functions.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,7 +97,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_locale;
</span><span class="cx" style="display: block; padding: 0 10px"> $i = $timestamp_with_offset;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false === $i ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! is_numeric( $i ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $i = current_time( 'timestamp', $gmt );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -177,7 +177,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $j = @gmdate( $dateformatstring, $i );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $j = gmdate( $dateformatstring, $i );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the date formatted based on the locale.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,7 +224,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $months_genitive = $wp_locale->month_genitive;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Match a format like 'j F Y' or 'j. F'
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( @preg_match( '#^\d{1,2}\.? [^\d ]+#u', $date ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( preg_match( '#^\d{1,2}\.? [^\d ]+#u', $date ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $months as $key => $month ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $months[ $key ] = '# ' . $month . '( |$)#u';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -238,7 +238,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Match a format like 'F jS' or 'F j' and change it to 'j F'
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( @preg_match( '#^[^\d ]+ \d{1,2}(st|nd|rd|th)? #u', trim( $date ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( preg_match( '#^[^\d ]+ \d{1,2}(st|nd|rd|th)? #u', trim( $date ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $months as $key => $month ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $months[ $key ] = '#' . $month . ' (\d{1,2})(st|nd|rd|th)?#u';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1258,7 +1258,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( $status_header, true, $code );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! headers_sent() ) {
+ header( $status_header, true, $code );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1310,26 +1312,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_get_nocache_headers()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function nocache_headers() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( headers_sent() ) {
+ return;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $headers = wp_get_nocache_headers();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $headers['Last-Modified'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // In PHP 5.3+, make sure we are not sending a Last-Modified header.
- if ( function_exists( 'header_remove' ) ) {
- @header_remove( 'Last-Modified' );
- } else {
- // In PHP 5.2, send an empty Last-Modified header, but only as a
- // last resort to override a header already sent. #WP23021
- foreach ( headers_list() as $header ) {
- if ( 0 === stripos( $header, 'Last-Modified' ) ) {
- $headers['Last-Modified'] = '';
- break;
- }
- }
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header_remove( 'Last-Modified' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $headers as $name => $field_value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( "{$name}: {$field_value}" );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header( "{$name}: {$field_value}" );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1829,7 +1823,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $dir_perms != ( $dir_perms & ~umask() ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> for ( $i = 1, $c = count( $folder_parts ); $i <= $c; $i++ ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2421,12 +2415,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return array( 'error' => $message );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ifp = @ fopen( $new_file, 'wb' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ifp = @fopen( $new_file, 'wb' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $ifp ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return array( 'error' => sprintf( __( 'Could not write file %s' ), $new_file ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @fwrite( $ifp, $bits );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ fwrite( $ifp, $bits );
</ins><span class="cx" style="display: block; padding: 0 10px"> fclose( $ifp );
</span><span class="cx" style="display: block; padding: 0 10px"> clearstatcache();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2434,7 +2428,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $stat = @ stat( dirname( $new_file ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $perms = $stat['mode'] & 0007777;
</span><span class="cx" style="display: block; padding: 0 10px"> $perms = $perms & 0000666;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ chmod( $new_file, $perms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ chmod( $new_file, $perms );
</ins><span class="cx" style="display: block; padding: 0 10px"> clearstatcache();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Compute the URL
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2707,7 +2701,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $imagetype = exif_imagetype( $file );
</span><span class="cx" style="display: block; padding: 0 10px"> $mime = ( $imagetype ) ? image_type_to_mime_type( $imagetype ) : false;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( function_exists( 'getimagesize' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $imagesize = getimagesize( $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $imagesize = @getimagesize( $file );
</ins><span class="cx" style="display: block; padding: 0 10px"> $mime = ( isset( $imagesize['mime'] ) ) ? $imagesize['mime'] : false;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $mime = false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3601,6 +3595,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Prepare the data for JSON serialization.
</span><span class="cx" style="display: block; padding: 0 10px"> $args[0] = _wp_json_prepare_data( $data );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- json_encode() errors are handled after this call
</ins><span class="cx" style="display: block; padding: 0 10px"> $json = @call_user_func_array( 'json_encode', $args );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If json_encode() was successful, no need to do more sanity checking.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3775,10 +3770,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $status_code The HTTP status code to output.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_send_json( $response, $status_code = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
- if ( null !== $status_code ) {
- status_header( $status_code );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! headers_sent() ) {
+ header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
+ if ( null !== $status_code ) {
+ status_header( $status_code );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> echo wp_json_encode( $response );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( wp_doing_ajax() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5726,7 +5724,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @see https://src.chromium.org/viewvc/chrome?view=rev&revision=6985
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function send_nosniff_header() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( 'X-Content-Type-Options: nosniff' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header( 'X-Content-Type-Options: nosniff' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5840,7 +5838,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @see https://developer.mozilla.org/en/the_x-frame-options_response_header
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function send_frame_options_header() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( 'X-Frame-Options: SAMEORIGIN' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header( 'X-Frame-Options: SAMEORIGIN' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6414,7 +6412,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $current_limit = @ini_get( 'memory_limit' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $current_limit = ini_get( 'memory_limit' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $current_limit_int = wp_convert_hr_to_bytes( $current_limit );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( -1 === $current_limit_int ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6486,13 +6484,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filtered_limit_int = wp_convert_hr_to_bytes( $filtered_limit );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( -1 === $filtered_limit_int || ( $filtered_limit_int > $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( false !== ini_set( 'memory_limit', $filtered_limit ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $filtered_limit;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( false !== ini_set( 'memory_limit', $wp_max_limit ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $wp_max_limit;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7179,13 +7177,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-* Checks compatibility with the current WordPress version.
-*
-* @since 5.2.0
-*
-* @param string $required Minimum required WordPress version.
-* @return bool True if required version is compatible or empty, false if not.
-*/
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Checks compatibility with the current WordPress version.
+ *
+ * @since 5.2.0
+ *
+ * @param string $required Minimum required WordPress version.
+ * @return bool True if required version is compatible or empty, false if not.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function is_wp_version_compatible( $required ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return empty( $required ) || version_compare( get_bloginfo( 'version' ), $required, '>=' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludeshttpphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/http.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/http.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/http.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -496,8 +496,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $origin = get_http_origin();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_allowed_http_origin( $origin ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @header( 'Access-Control-Allow-Origin: ' . $origin );
- @header( 'Access-Control-Allow-Credentials: true' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header( 'Access-Control-Allow-Origin: ' . $origin );
+ header( 'Access-Control-Allow-Credentials: true' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'OPTIONS' === $_SERVER['REQUEST_METHOD'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> exit;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesloadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/load.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/load.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/load.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -352,7 +352,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || wp_doing_ajax() || wp_is_json_request() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @ini_set( 'display_errors', 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ini_set( 'display_errors', 0 );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -908,6 +908,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_set_internal_encoding() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( function_exists( 'mb_internal_encoding' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $charset = get_option( 'blog_charset' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $charset || ! @mb_internal_encoding( $charset ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> mb_internal_encoding( 'UTF-8' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesmediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/media.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -238,7 +238,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $info = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $thumb_file ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $info = getimagesize( $thumb_file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $info = @getimagesize( $thumb_file );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $thumb_file && $info ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -910,8 +910,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/post.php */
</span><span class="cx" style="display: block; padding: 0 10px"> $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $src_file = $icon_dir . '/' . wp_basename( $src );
- @list( $width, $height ) = getimagesize( $src_file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $src_file = $icon_dir . '/' . wp_basename( $src );
+ list( $width, $height ) = @getimagesize( $src_file );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludespluggablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pluggable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pluggable.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/pluggable.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1522,7 +1522,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $switched_locale = switch_to_locale( get_locale() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_author_domain = @gethostbyaddr( $comment->comment_author_IP );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_author_domain = '';
+ if ( WP_Http::is_ip_address( $comment->comment_author_IP ) ) {
+ $comment_author_domain = gethostbyaddr( $comment->comment_author_IP );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // The blogname option is escaped with esc_html on the way into the database in sanitize_option
</span><span class="cx" style="display: block; padding: 0 10px"> // we want to reverse this for the plain text arena of emails.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1639,7 +1642,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message_headers = apply_filters( 'comment_notification_headers', $message_headers, $comment->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $emails as $email ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $switched_locale ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1696,9 +1699,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $switched_locale = switch_to_locale( get_locale() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_author_domain = @gethostbyaddr( $comment->comment_author_IP );
- $comments_waiting = $wpdb->get_var( "SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'" );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_author_domain = '';
+ if ( WP_Http::is_ip_address( $comment->comment_author_IP ) ) {
+ $comment_author_domain = gethostbyaddr( $comment->comment_author_IP );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comments_waiting = $wpdb->get_var( "SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'" );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // The blogname option is escaped with esc_html on the way into the database in sanitize_option
</span><span class="cx" style="display: block; padding: 0 10px"> // we want to reverse this for the plain text arena of emails.
</span><span class="cx" style="display: block; padding: 0 10px"> $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1810,7 +1817,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message_headers = apply_filters( 'comment_moderation_headers', $message_headers, $comment_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $emails as $email ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $switched_locale ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1947,7 +1954,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_new_user_notification_email_admin = apply_filters( 'wp_new_user_notification_email_admin', $wp_new_user_notification_email_admin, $user, $blogname );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- @wp_mail(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_mail(
</ins><span class="cx" style="display: block; padding: 0 10px"> $wp_new_user_notification_email_admin['to'],
</span><span class="cx" style="display: block; padding: 0 10px"> wp_specialchars_decode( sprintf( $wp_new_user_notification_email_admin['subject'], $blogname ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_new_user_notification_email_admin['message'],
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiclasswprestserverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/class-wp-rest-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/class-wp-rest-server.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/rest-api/class-wp-rest-server.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1279,19 +1279,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $key Header key.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function remove_header( $key ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( function_exists( 'header_remove' ) ) {
- // In PHP 5.3+ there is a way to remove an already set header.
- header_remove( $key );
- } else {
- // In PHP 5.2, send an empty header, but only as a last resort to
- // override a header already sent.
- foreach ( headers_list() as $header ) {
- if ( 0 === stripos( $header, "$key:" ) ) {
- $this->send_header( $key, '' );
- break;
- }
- }
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ header_remove( $key );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetrssphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-rss.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-rss.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/widgets/class-wp-widget-rss.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -67,7 +67,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $link = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_wp_error( $rss ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $desc = esc_attr( strip_tags( @html_entity_decode( $rss->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $desc = esc_attr( strip_tags( html_entity_decode( $rss->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $title ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $title = strip_tags( $rss->get_title() );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgettextphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-text.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-text.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/widgets/class-wp-widget-text.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,6 +123,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Suppress warnings generated by loadHTML
</span><span class="cx" style="display: block; padding: 0 10px"> $errors = libxml_use_internal_errors( true );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> @$doc->loadHTML(
</span><span class="cx" style="display: block; padding: 0 10px"> sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> '<!DOCTYPE html><html><head><meta charset="%s"></head><body>%s</body></html>',
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/widgets.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1493,7 +1493,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $title = __( 'Untitled' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $desc = @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $desc = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> $desc = esc_attr( wp_trim_words( $desc, 55, ' […]' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $summary = '';
</span></span></pre></div>
<a id="trunksrcwpincludeswpdbphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/wp-db.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/wp-db.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-includes/wp-db.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1376,7 +1376,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> array_walk( $args, array( $this, 'escape_by_ref' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $query = @vsprintf( $query, $args );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $query = vsprintf( $query, $args );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->add_placeholder_escape( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1614,6 +1614,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( WP_DEBUG ) {
</span><span class="cx" style="display: block; padding: 0 10px"> mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> @mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1645,6 +1646,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( WP_DEBUG ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpsettingsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-settings.php 2019-07-09 01:09:53 UTC (rev 45610)
+++ trunk/src/wp-settings.php 2019-07-09 05:44:42 UTC (rev 45611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,10 +54,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Check for the required PHP version and for the MySQL extension or a database drop-in.
</span><span class="cx" style="display: block; padding: 0 10px"> wp_check_php_mysql_versions();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
-@ini_set( 'magic_quotes_runtime', 0 );
-@ini_set( 'magic_quotes_sybase', 0 );
-
</del><span class="cx" style="display: block; padding: 0 10px"> // WordPress calculates offsets from UTC.
</span><span class="cx" style="display: block; padding: 0 10px"> date_default_timezone_set( 'UTC' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,9 +86,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
</span><span class="cx" style="display: block; padding: 0 10px"> * Default true.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ include( WP_CONTENT_DIR . '/advanced-cache.php' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Re-initialize any hooks added manually by advanced-cache.php
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $wp_filter ) {
</span></span></pre>
</div>
</div>
</body>
</html>