Changeset 45730
- Timestamp:
- 08/03/2019 08:20:42 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-ftp.php
r45424 r45730 186 186 if ($lcount<8) return ''; 187 187 $b = array(); 188 $b['isdir'] = $lucifer[0] {0}=== "d";189 $b['islink'] = $lucifer[0] {0}=== "l";188 $b['isdir'] = $lucifer[0][0] === "d"; 189 $b['islink'] = $lucifer[0][0] === "l"; 190 190 if ( $b['isdir'] ) 191 191 $b['type'] = 'd'; -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r45611 r45730 600 600 } 601 601 $b = array(); 602 $b['isdir'] = $lucifer[0] {0}=== 'd';603 $b['islink'] = $lucifer[0] {0}=== 'l';602 $b['isdir'] = $lucifer[0][0] === 'd'; 603 $b['islink'] = $lucifer[0][0] === 'l'; 604 604 if ( $b['isdir'] ) { 605 605 $b['type'] = 'd'; -
trunk/src/wp-admin/includes/class-wp-importer.php
r45603 r45730 308 308 } elseif ( (bool) preg_match( '/^-([a-zA-Z0-9]+)/', $args[ $i ], $match ) ) { 309 309 for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) { 310 $key = $match[1] {$j};310 $key = $match[1][ $j ]; 311 311 $out[ $key ] = true; 312 312 } -
trunk/src/wp-includes/class-json.php
r45535 r45730 178 178 } 179 179 180 $bytes = (ord($utf16 {0}) << 8) | ord($utf16{1});180 $bytes = (ord($utf16[0]) << 8) | ord($utf16[1]); 181 181 182 182 switch(true) { … … 231 231 // return a UTF-16 character from a 2-byte UTF-8 char 232 232 // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 233 return chr(0x07 & (ord($utf8 {0}) >> 2))234 . chr((0xC0 & (ord($utf8 {0}) << 6))235 | (0x3F & ord($utf8 {1})));233 return chr(0x07 & (ord($utf8[0]) >> 2)) 234 . chr((0xC0 & (ord($utf8[0]) << 6)) 235 | (0x3F & ord($utf8[1]))); 236 236 237 237 case 3: 238 238 // return a UTF-16 character from a 3-byte UTF-8 char 239 239 // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 240 return chr((0xF0 & (ord($utf8 {0}) << 4))241 | (0x0F & (ord($utf8 {1}) >> 2)))242 . chr((0xC0 & (ord($utf8 {1}) << 6))243 | (0x7F & ord($utf8 {2})));240 return chr((0xF0 & (ord($utf8[0]) << 4)) 241 | (0x0F & (ord($utf8[1]) >> 2))) 242 . chr((0xC0 & (ord($utf8[1]) << 6)) 243 | (0x7F & ord($utf8[2]))); 244 244 } 245 245 … … 324 324 for ($c = 0; $c < $strlen_var; ++$c) { 325 325 326 $ord_var_c = ord($var {$c});326 $ord_var_c = ord($var[$c]); 327 327 328 328 switch (true) { … … 347 347 case $ord_var_c == 0x5C: 348 348 // double quote, slash, slosh 349 $ascii .= '\\'.$var {$c};349 $ascii .= '\\'.$var[$c]; 350 350 break; 351 351 352 352 case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): 353 353 // characters U-00000000 - U-0000007F (same as ASCII) 354 $ascii .= $var {$c};354 $ascii .= $var[$c]; 355 355 break; 356 356 … … 364 364 } 365 365 366 $char = pack('C*', $ord_var_c, ord($var {$c + 1}));366 $char = pack('C*', $ord_var_c, ord($var[$c + 1])); 367 367 $c += 1; 368 368 $utf16 = $this->utf82utf16($char); … … 379 379 // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 380 380 $char = pack('C*', $ord_var_c, 381 @ord($var {$c + 1}),382 @ord($var {$c + 2}));381 @ord($var[$c + 1]), 382 @ord($var[$c + 2])); 383 383 $c += 2; 384 384 $utf16 = $this->utf82utf16($char); … … 395 395 // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 396 396 $char = pack('C*', $ord_var_c, 397 ord($var {$c + 1}),398 ord($var {$c + 2}),399 ord($var {$c + 3}));397 ord($var[$c + 1]), 398 ord($var[$c + 2]), 399 ord($var[$c + 3])); 400 400 $c += 3; 401 401 $utf16 = $this->utf82utf16($char); … … 412 412 } 413 413 $char = pack('C*', $ord_var_c, 414 ord($var {$c + 1}),415 ord($var {$c + 2}),416 ord($var {$c + 3}),417 ord($var {$c + 4}));414 ord($var[$c + 1]), 415 ord($var[$c + 2]), 416 ord($var[$c + 3]), 417 ord($var[$c + 4])); 418 418 $c += 4; 419 419 $utf16 = $this->utf82utf16($char); … … 430 430 // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 431 431 $char = pack('C*', $ord_var_c, 432 ord($var {$c + 1}),433 ord($var {$c + 2}),434 ord($var {$c + 3}),435 ord($var {$c + 4}),436 ord($var {$c + 5}));432 ord($var[$c + 1]), 433 ord($var[$c + 2]), 434 ord($var[$c + 3]), 435 ord($var[$c + 4]), 436 ord($var[$c + 5])); 437 437 $c += 5; 438 438 $utf16 = $this->utf82utf16($char); … … 627 627 628 628 $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); 629 $ord_chrs_c = ord($chrs {$c});629 $ord_chrs_c = ord($chrs[$c]); 630 630 631 631 switch (true) { … … 657 657 if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || 658 658 ($delim == "'" && $substr_chrs_c_2 != '\\"')) { 659 $utf8 .= $chrs {++$c};659 $utf8 .= $chrs[++$c]; 660 660 } 661 661 break; … … 670 670 671 671 case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): 672 $utf8 .= $chrs {$c};672 $utf8 .= $chrs[$c]; 673 673 break; 674 674 … … 717 717 // array, or object notation 718 718 719 if ($str {0}== '[') {719 if ($str[0] == '[') { 720 720 $stk = array(SERVICES_JSON_IN_ARR); 721 721 $arr = array(); … … 756 756 $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); 757 757 758 if (($c == $strlen_chrs) || (($chrs {$c}== ',') && ($top['what'] == SERVICES_JSON_SLICE))) {758 if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { 759 759 // found a comma that is not inside a string, array, etc., 760 760 // OR we've reached the end of the character list … … 797 797 } 798 798 799 } elseif ((($chrs {$c} == '"') || ($chrs{$c}== "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {799 } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { 800 800 // found a quote, and we are not inside a string 801 array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs {$c}));801 array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c])); 802 802 //print("Found start of string at {$c}\n"); 803 803 804 } elseif (($chrs {$c}== $top['delim']) &&804 } elseif (($chrs[$c] == $top['delim']) && 805 805 ($top['what'] == SERVICES_JSON_IN_STR) && 806 806 (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) { … … 811 811 //print("Found end of string at {$c}: ".$this->substr8($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); 812 812 813 } elseif (($chrs {$c}== '[') &&813 } elseif (($chrs[$c] == '[') && 814 814 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { 815 815 // found a left-bracket, and we are in an array, object, or slice … … 817 817 //print("Found start of array at {$c}\n"); 818 818 819 } elseif (($chrs {$c}== ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {819 } elseif (($chrs[$c] == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { 820 820 // found a right-bracket, and we're in an array 821 821 array_pop($stk); 822 822 //print("Found end of array at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); 823 823 824 } elseif (($chrs {$c}== '{') &&824 } elseif (($chrs[$c] == '{') && 825 825 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { 826 826 // found a left-brace, and we are in an array, object, or slice … … 828 828 //print("Found start of object at {$c}\n"); 829 829 830 } elseif (($chrs {$c}== '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {830 } elseif (($chrs[$c] == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { 831 831 // found a right-brace, and we're in an object 832 832 array_pop($stk); -
trunk/src/wp-includes/class-pop3.php
r42201 r45730 377 377 while ( !preg_match('/^\.\r\n/',$line)) 378 378 { 379 if ( $line {0}== '.' ) { $line = substr($line,1); }379 if ( $line[0] == '.' ) { $line = substr($line,1); } 380 380 $MsgArray[$count] = $line; 381 381 $count++; -
trunk/src/wp-includes/class-wp-editor.php
r45621 r45730 758 758 continue; 759 759 } elseif ( ! empty( $value ) && is_string( $value ) && ( 760 ( '{' == $value {0} && '}' == $value{strlen( $value ) - 1}) ||761 ( '[' == $value {0} && ']' == $value{strlen( $value ) - 1}) ||760 ( '{' == $value[0] && '}' == $value[ strlen( $value ) - 1 ] ) || 761 ( '[' == $value[0] && ']' == $value[ strlen( $value ) - 1 ] ) || 762 762 preg_match( '/^\(?function ?\(/', $value ) ) ) { 763 763 -
trunk/src/wp-includes/script-loader.php
r45673 r45730 755 755 continue; 756 756 } elseif ( ! empty( $value ) && is_string( $value ) && ( 757 ( '{' === $value {0} && '}' === $value{strlen( $value ) - 1}) ||758 ( '[' === $value {0} && ']' === $value{strlen( $value ) - 1}) ||757 ( '{' === $value[0] && '}' === $value[ strlen( $value ) - 1 ] ) || 758 ( '[' === $value[0] && ']' === $value[ strlen( $value ) - 1 ] ) || 759 759 preg_match( '/^\(?function ?\(/', $value ) ) ) { 760 760 $init_obj .= $key . ':' . $value . ',';
Note: See TracChangeset
for help on using the changeset viewer.