<!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>[45730] trunk/src: PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax</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/45730">45730</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/45730","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>jorbin</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-08-03 20:20:42 +0000 (Sat, 03 Aug 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'>PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax

PHP used to allow both square brackets and curly braces to be used interchangeably for accessing array elements and string offsets. The curly bracket syntax is only allowed in a limited set of cases and can be confusing for people not used to it.
PHP 7.4 will deprecate the curly brace syntax for accessing array elements and string offsets and it is expected that support will be completely removed in PHP 8.0.
Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

See <a href="https://core.trac.wordpress.org/ticket/47751">#47751</a>.
Props jrf.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclassftpphp">trunk/src/wp-admin/includes/class-ftp.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpfilesystemftpextphp">trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpimporterphp">trunk/src/wp-admin/includes/class-wp-importer.php</a></li>
<li><a href="#trunksrcwpincludesclassjsonphp">trunk/src/wp-includes/class-json.php</a></li>
<li><a href="#trunksrcwpincludesclasspop3php">trunk/src/wp-includes/class-pop3.php</a></li>
<li><a href="#trunksrcwpincludesclasswpeditorphp">trunk/src/wp-includes/class-wp-editor.php</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclassftpphp"></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-ftp.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-ftp.php 2019-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-admin/includes/class-ftp.php   2019-08-03 20:20:42 UTC (rev 45730)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,8 +185,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $lcount=count($lucifer);
</span><span class="cx" style="display: block; padding: 0 10px">                        if ($lcount<8) return '';
</span><span class="cx" style="display: block; padding: 0 10px">                        $b = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $b['isdir'] = $lucifer[0]{0} === "d";
-                       $b['islink'] = $lucifer[0]{0} === "l";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $b['isdir'] = $lucifer[0][0] === "d";
+                       $b['islink'] = $lucifer[0][0] === "l";
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( $b['isdir'] )
</span><span class="cx" style="display: block; padding: 0 10px">                                $b['type'] = 'd';
</span><span class="cx" style="display: block; padding: 0 10px">                        elseif ( $b['islink'] )
</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-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php  2019-08-03 20:20:42 UTC (rev 45730)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -599,8 +599,8 @@
</span><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">                                $b           = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $b['isdir']  = $lucifer[0]{0} === 'd';
-                               $b['islink'] = $lucifer[0]{0} === 'l';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $b['isdir']  = $lucifer[0][0] === 'd';
+                               $b['islink'] = $lucifer[0][0] === 'l';
</ins><span class="cx" style="display: block; padding: 0 10px">                                 if ( $b['isdir'] ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                        $b['type'] = 'd';
</span><span class="cx" style="display: block; padding: 0 10px">                                } elseif ( $b['islink'] ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpimporterphp"></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-importer.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-importer.php 2019-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-admin/includes/class-wp-importer.php   2019-08-03 20:20:42 UTC (rev 45730)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -307,7 +307,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $last_arg = $key;
</span><span class="cx" style="display: block; padding: 0 10px">                } elseif ( (bool) preg_match( '/^-([a-zA-Z0-9]+)/', $args[ $i ], $match ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $key         = $match[1]{$j};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $key         = $match[1][ $j ];
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $out[ $key ] = 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="trunksrcwpincludesclassjsonphp"></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-json.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-json.php      2019-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-includes/class-json.php        2019-08-03 20:20:42 UTC (rev 45730)
</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">             return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
</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">-        $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        $bytes = (ord($utf16[0]) << 8) | ord($utf16[1]);
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">         switch(true) {
</span><span class="cx" style="display: block; padding: 0 10px">             case ((0x7F & $bytes) == $bytes):
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -230,17 +230,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">             case 2:
</span><span class="cx" style="display: block; padding: 0 10px">                 // return a UTF-16 character from a 2-byte UTF-8 char
</span><span class="cx" style="display: block; padding: 0 10px">                 // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                return chr(0x07 & (ord($utf8{0}) >> 2))
-                     . chr((0xC0 & (ord($utf8{0}) << 6))
-                         | (0x3F & ord($utf8{1})));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                return chr(0x07 & (ord($utf8[0]) >> 2))
+                     . chr((0xC0 & (ord($utf8[0]) << 6))
+                         | (0x3F & ord($utf8[1])));
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">             case 3:
</span><span class="cx" style="display: block; padding: 0 10px">                 // return a UTF-16 character from a 3-byte UTF-8 char
</span><span class="cx" style="display: block; padding: 0 10px">                 // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                return chr((0xF0 & (ord($utf8{0}) << 4))
-                         | (0x0F & (ord($utf8{1}) >> 2)))
-                     . chr((0xC0 & (ord($utf8{1}) << 6))
-                         | (0x7F & ord($utf8{2})));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                return chr((0xF0 & (ord($utf8[0]) << 4))
+                         | (0x0F & (ord($utf8[1]) >> 2)))
+                     . chr((0xC0 & (ord($utf8[1]) << 6))
+                         | (0x7F & ord($utf8[2])));
</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">         // ignoring UTF-32 for now, sorry
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -323,7 +323,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 */
</span><span class="cx" style="display: block; padding: 0 10px">                 for ($c = 0; $c < $strlen_var; ++$c) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                    $ord_var_c = ord($var{$c});
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                    $ord_var_c = ord($var[$c]);
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                     switch (true) {
</span><span class="cx" style="display: block; padding: 0 10px">                         case $ord_var_c == 0x08:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -346,12 +346,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         case $ord_var_c == 0x2F:
</span><span class="cx" style="display: block; padding: 0 10px">                         case $ord_var_c == 0x5C:
</span><span class="cx" style="display: block; padding: 0 10px">                             // double quote, slash, slosh
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                            $ascii .= '\\'.$var{$c};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            $ascii .= '\\'.$var[$c];
</ins><span class="cx" style="display: block; padding: 0 10px">                             break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                         case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
</span><span class="cx" style="display: block; padding: 0 10px">                             // characters U-00000000 - U-0000007F (same as ASCII)
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                            $ascii .= $var{$c};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            $ascii .= $var[$c];
</ins><span class="cx" style="display: block; padding: 0 10px">                             break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                         case (($ord_var_c & 0xE0) == 0xC0):
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -363,7 +363,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                 break;
</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">-                            $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            $char = pack('C*', $ord_var_c, ord($var[$c + 1]));
</ins><span class="cx" style="display: block; padding: 0 10px">                             $c += 1;
</span><span class="cx" style="display: block; padding: 0 10px">                             $utf16 = $this->utf82utf16($char);
</span><span class="cx" style="display: block; padding: 0 10px">                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -378,8 +378,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             // characters U-00000800 - U-0000FFFF, mask 1110XXXX
</span><span class="cx" style="display: block; padding: 0 10px">                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
</span><span class="cx" style="display: block; padding: 0 10px">                             $char = pack('C*', $ord_var_c,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                         @ord($var{$c + 1}),
-                                         @ord($var{$c + 2}));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         @ord($var[$c + 1]),
+                                         @ord($var[$c + 2]));
</ins><span class="cx" style="display: block; padding: 0 10px">                             $c += 2;
</span><span class="cx" style="display: block; padding: 0 10px">                             $utf16 = $this->utf82utf16($char);
</span><span class="cx" style="display: block; padding: 0 10px">                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -394,9 +394,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             // characters U-00010000 - U-001FFFFF, mask 11110XXX
</span><span class="cx" style="display: block; padding: 0 10px">                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
</span><span class="cx" style="display: block; padding: 0 10px">                             $char = pack('C*', $ord_var_c,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                         ord($var{$c + 1}),
-                                         ord($var{$c + 2}),
-                                         ord($var{$c + 3}));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         ord($var[$c + 1]),
+                                         ord($var[$c + 2]),
+                                         ord($var[$c + 3]));
</ins><span class="cx" style="display: block; padding: 0 10px">                             $c += 3;
</span><span class="cx" style="display: block; padding: 0 10px">                             $utf16 = $this->utf82utf16($char);
</span><span class="cx" style="display: block; padding: 0 10px">                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -411,10 +411,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                 break;
</span><span class="cx" style="display: block; padding: 0 10px">                             }
</span><span class="cx" style="display: block; padding: 0 10px">                             $char = pack('C*', $ord_var_c,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                         ord($var{$c + 1}),
-                                         ord($var{$c + 2}),
-                                         ord($var{$c + 3}),
-                                         ord($var{$c + 4}));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         ord($var[$c + 1]),
+                                         ord($var[$c + 2]),
+                                         ord($var[$c + 3]),
+                                         ord($var[$c + 4]));
</ins><span class="cx" style="display: block; padding: 0 10px">                             $c += 4;
</span><span class="cx" style="display: block; padding: 0 10px">                             $utf16 = $this->utf82utf16($char);
</span><span class="cx" style="display: block; padding: 0 10px">                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -429,11 +429,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             // characters U-04000000 - U-7FFFFFFF, mask 1111110X
</span><span class="cx" style="display: block; padding: 0 10px">                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
</span><span class="cx" style="display: block; padding: 0 10px">                             $char = pack('C*', $ord_var_c,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                         ord($var{$c + 1}),
-                                         ord($var{$c + 2}),
-                                         ord($var{$c + 3}),
-                                         ord($var{$c + 4}),
-                                         ord($var{$c + 5}));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         ord($var[$c + 1]),
+                                         ord($var[$c + 2]),
+                                         ord($var[$c + 3]),
+                                         ord($var[$c + 4]),
+                                         ord($var[$c + 5]));
</ins><span class="cx" style="display: block; padding: 0 10px">                             $c += 5;
</span><span class="cx" style="display: block; padding: 0 10px">                             $utf16 = $this->utf82utf16($char);
</span><span class="cx" style="display: block; padding: 0 10px">                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -626,7 +626,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                     for ($c = 0; $c < $strlen_chrs; ++$c) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                         $substr_chrs_c_2 = $this->substr8($chrs, $c, 2);
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $ord_chrs_c = ord($chrs{$c});
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        $ord_chrs_c = ord($chrs[$c]);
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                         switch (true) {
</span><span class="cx" style="display: block; padding: 0 10px">                             case $substr_chrs_c_2 == '\b':
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -656,7 +656,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             case $substr_chrs_c_2 == '\\/':
</span><span class="cx" style="display: block; padding: 0 10px">                                 if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
</span><span class="cx" style="display: block; padding: 0 10px">                                    ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                    $utf8 .= $chrs{++$c};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                    $utf8 .= $chrs[++$c];
</ins><span class="cx" style="display: block; padding: 0 10px">                                 }
</span><span class="cx" style="display: block; padding: 0 10px">                                 break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -669,7 +669,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                 break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                             case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $utf8 .= $chrs{$c};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                $utf8 .= $chrs[$c];
</ins><span class="cx" style="display: block; padding: 0 10px">                                 break;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                             case ($ord_chrs_c & 0xE0) == 0xC0:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -716,7 +716,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
</span><span class="cx" style="display: block; padding: 0 10px">                     // array, or object notation
</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 ($str{0} == '[') {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                    if ($str[0] == '[') {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $stk = array(SERVICES_JSON_IN_ARR);
</span><span class="cx" style="display: block; padding: 0 10px">                         $arr = array();
</span><span class="cx" style="display: block; padding: 0 10px">                     } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -755,7 +755,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         $top = end($stk);
</span><span class="cx" style="display: block; padding: 0 10px">                         $substr_chrs_c_2 = $this->substr8($chrs, $c, 2);
</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 (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
</ins><span class="cx" style="display: block; padding: 0 10px">                             // found a comma that is not inside a string, array, etc.,
</span><span class="cx" style="display: block; padding: 0 10px">                             // OR we've reached the end of the character list
</span><span class="cx" style="display: block; padding: 0 10px">                             $slice = $this->substr8($chrs, $top['where'], ($c - $top['where']));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -796,12 +796,12 @@
</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">-                        } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
</ins><span class="cx" style="display: block; padding: 0 10px">                             // found a quote, and we are not inside a string
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                            array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c]));
</ins><span class="cx" style="display: block; padding: 0 10px">                             //print("Found start of string at {$c}\n");
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } elseif (($chrs{$c} == $top['delim']) &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        } elseif (($chrs[$c] == $top['delim']) &&
</ins><span class="cx" style="display: block; padding: 0 10px">                                  ($top['what'] == SERVICES_JSON_IN_STR) &&
</span><span class="cx" style="display: block; padding: 0 10px">                                  (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) {
</span><span class="cx" style="display: block; padding: 0 10px">                             // found a quote, we're in a string, and it's not escaped
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -810,24 +810,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             array_pop($stk);
</span><span class="cx" style="display: block; padding: 0 10px">                             //print("Found end of string at {$c}: ".$this->substr8($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } elseif (($chrs{$c} == '[') &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        } elseif (($chrs[$c] == '[') &&
</ins><span class="cx" style="display: block; padding: 0 10px">                                  in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
</span><span class="cx" style="display: block; padding: 0 10px">                             // found a left-bracket, and we are in an array, object, or slice
</span><span class="cx" style="display: block; padding: 0 10px">                             array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
</span><span class="cx" style="display: block; padding: 0 10px">                             //print("Found start of array at {$c}\n");
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        } elseif (($chrs[$c] == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
</ins><span class="cx" style="display: block; padding: 0 10px">                             // found a right-bracket, and we're in an array
</span><span class="cx" style="display: block; padding: 0 10px">                             array_pop($stk);
</span><span class="cx" style="display: block; padding: 0 10px">                             //print("Found end of array at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n");
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } elseif (($chrs{$c} == '{') &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        } elseif (($chrs[$c] == '{') &&
</ins><span class="cx" style="display: block; padding: 0 10px">                                  in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
</span><span class="cx" style="display: block; padding: 0 10px">                             // found a left-brace, and we are in an array, object, or slice
</span><span class="cx" style="display: block; padding: 0 10px">                             array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
</span><span class="cx" style="display: block; padding: 0 10px">                             //print("Found start of object at {$c}\n");
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        } elseif (($chrs[$c] == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
</ins><span class="cx" style="display: block; padding: 0 10px">                             // found a right-brace, and we're in an object
</span><span class="cx" style="display: block; padding: 0 10px">                             array_pop($stk);
</span><span class="cx" style="display: block; padding: 0 10px">                             //print("Found end of object at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n");
</span></span></pre></div>
<a id="trunksrcwpincludesclasspop3php"></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-pop3.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-pop3.php      2019-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-includes/class-pop3.php        2019-08-03 20:20:42 UTC (rev 45730)
</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">         $line = fgets($fp,$buffer);
</span><span class="cx" style="display: block; padding: 0 10px">         while ( !preg_match('/^\.\r\n/',$line))
</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 ( $line{0} == '.' ) { $line = substr($line,1); }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+            if ( $line[0] == '.' ) { $line = substr($line,1); }
</ins><span class="cx" style="display: block; padding: 0 10px">             $MsgArray[$count] = $line;
</span><span class="cx" style="display: block; padding: 0 10px">             $count++;
</span><span class="cx" style="display: block; padding: 0 10px">             $line = fgets($fp,$buffer);
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpeditorphp"></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-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-editor.php 2019-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-includes/class-wp-editor.php   2019-08-03 20:20:42 UTC (rev 45730)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -757,8 +757,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $options .= $key . ':' . $val . ',';
</span><span class="cx" style="display: block; padding: 0 10px">                                continue;
</span><span class="cx" style="display: block; padding: 0 10px">                        } elseif ( ! empty( $value ) && is_string( $value ) && (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                ( '{' == $value{0} && '}' == $value{strlen( $value ) - 1} ) ||
-                               ( '[' == $value{0} && ']' == $value{strlen( $value ) - 1} ) ||
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         ( '{' == $value[0] && '}' == $value[ strlen( $value ) - 1 ] ) ||
+                               ( '[' == $value[0] && ']' == $value[ strlen( $value ) - 1 ] ) ||
</ins><span class="cx" style="display: block; padding: 0 10px">                                 preg_match( '/^\(?function ?\(/', $value ) ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                $options .= $key . ':' . $value . ',';
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></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/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php   2019-08-03 15:45:06 UTC (rev 45729)
+++ trunk/src/wp-includes/script-loader.php     2019-08-03 20:20:42 UTC (rev 45730)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -754,8 +754,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $init_obj .= $key . ':' . $val . ',';
</span><span class="cx" style="display: block; padding: 0 10px">                        continue;
</span><span class="cx" style="display: block; padding: 0 10px">                } elseif ( ! empty( $value ) && is_string( $value ) && (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        ( '{' === $value{0} && '}' === $value{strlen( $value ) - 1} ) ||
-                       ( '[' === $value{0} && ']' === $value{strlen( $value ) - 1} ) ||
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 ( '{' === $value[0] && '}' === $value[ strlen( $value ) - 1 ] ) ||
+                       ( '[' === $value[0] && ']' === $value[ strlen( $value ) - 1 ] ) ||
</ins><span class="cx" style="display: block; padding: 0 10px">                         preg_match( '/^\(?function ?\(/', $value ) ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $init_obj .= $key . ':' . $value . ',';
</span><span class="cx" style="display: block; padding: 0 10px">                        continue;
</span></span></pre>
</div>
</div>

</body>
</html>