Ticket #49922: 49922.2.diff
File 49922.2.diff, 8.5 KB (added by , 5 years ago) |
---|
-
phpcompat.xml.dist
41 41 <exclude-pattern>/vendor/*</exclude-pattern> 42 42 43 43 <!-- 44 PHPCompatibilityParagonieSodiumCompat prevents false positives in `sodium_compat`. 45 However, because these files are included in a non-standard path, false positives are triggered in WordPress Core. 46 --> 47 <exclude-pattern>src/wp-includes/sodium_compat/lib/php72compat_const\.php$</exclude-pattern> 48 49 <rule ref="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_keypair_from_secretkey_and_publickeyFound"> 50 <exclude-pattern>/sodium_compat/src/Compat\.php$</exclude-pattern> 51 </rule> 52 <rule ref="PHPCompatibility.FunctionUse.NewFunctions.sodium_padFound"> 53 <exclude-pattern>/sodium_compat/src/Compat\.php$</exclude-pattern> 54 </rule> 55 <rule ref="PHPCompatibility.FunctionUse.NewFunctions.sodium_unpadFound"> 56 <exclude-pattern>/sodium_compat/src/Compat\.php$</exclude-pattern> 57 </rule> 58 59 <!-- 44 60 PHPCompatibilityParagonieRandomCompat prevents false positives in `random_compat`. 45 61 However, because these files are included in a non-standard path, false positives are triggered in WordPress Core. 46 62 --> -
src/wp-admin/includes/class-ftp.php
899 899 $mod_sockets = extension_loaded( 'sockets' ); 900 900 if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) { 901 901 $prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : ''; 902 @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX ); 902 @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX ); // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.dlDeprecated 903 903 $mod_sockets = extension_loaded( 'sockets' ); 904 904 } 905 905 -
src/wp-admin/includes/schema.php
369 369 */ 370 370 do_action( 'populate_options' ); 371 371 372 if ( ini_get( 'safe_mode' ) ) {373 // Safe mode can break mkdir() so use a flat structure by default.374 $uploads_use_yearmonth_folders = 0;375 } else {376 $uploads_use_yearmonth_folders = 1;377 }378 379 372 // If WP_DEFAULT_THEME doesn't exist, fall back to the latest core default theme. 380 373 $stylesheet = WP_DEFAULT_THEME; 381 374 $template = WP_DEFAULT_THEME; … … 466 459 'db_version' => $wp_db_version, 467 460 468 461 // 2.0.1 469 'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders,462 'uploads_use_yearmonth_folders' => 1, 470 463 'upload_path' => '', 471 464 472 465 // 2.1 -
src/wp-includes/ID3/getid3.php
285 285 } 286 286 287 287 // Check safe_mode off 288 if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) { 288 if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) { // phpcs:ignore // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_runtimeDeprecated 289 289 $this->warning('WARNING: Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbos/flac tag writing disabled.'); 290 290 } 291 291 … … 300 300 if (version_compare(PHP_VERSION, '7.4.0', '<')) { 301 301 // Check for magic_quotes_runtime 302 302 if (function_exists('get_magic_quotes_runtime')) { 303 if (get_magic_quotes_runtime()) { 303 if (get_magic_quotes_runtime()) { // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_runtimeDeprecated 304 304 $this->startup_error .= 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).'."\n"; 305 305 } 306 306 } 307 307 // Check for magic_quotes_gpc 308 308 if (function_exists('get_magic_quotes_gpc')) { 309 if (get_magic_quotes_gpc()) { 309 if (get_magic_quotes_gpc()) { // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_gpcDeprecated 310 310 $this->startup_error .= 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).'."\n"; 311 311 } 312 312 } … … 1560 1560 // page sequence numbers likely happens for OggSpeex and OggFLAC as well, but 1561 1561 // currently vorbiscomment only works on OggVorbis files. 1562 1562 1563 if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) { 1563 if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) { // phpcs:ignore // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_runtimeDeprecated 1564 1564 1565 1565 $this->warning('Failed making system call to vorbiscomment.exe - '.$algorithm.'_data is incorrect - error returned: PHP running in Safe Mode (backtick operator not available)'); 1566 1566 $this->info[$algorithm.'_data'] = false; -
src/wp-includes/class-snoopy.php
183 183 $frameurls = $this->_frameurls; 184 184 $this->_frameurls = array(); 185 185 186 while(list(,$frameurl) = each($frameurls))186 foreach ( $frameurls as $frameurl ) 187 187 { 188 188 if($this->_framedepth < $this->maxframes) 189 189 { … … 243 243 $frameurls = $this->_frameurls; 244 244 $this->_frameurls = array(); 245 245 246 while(list(,$frameurl) = each($frameurls))246 foreach ( $frameurls as $frameurl ) 247 247 { 248 248 if($this->_framedepth < $this->maxframes) 249 249 { … … 341 341 $frameurls = $this->_frameurls; 342 342 $this->_frameurls = array(); 343 343 344 while(list(,$frameurl) = each($frameurls))344 foreach ( $frameurls as $frameurl ) 345 345 { 346 346 if($this->_framedepth < $this->maxframes) 347 347 { … … 408 408 $frameurls = $this->_frameurls; 409 409 $this->_frameurls = array(); 410 410 411 while(list(,$frameurl) = each($frameurls))411 foreach ( $frameurls as $frameurl ) 412 412 { 413 413 if($this->_framedepth < $this->maxframes) 414 414 { … … 629 629 630 630 // catenate the non-empty matches from the conditional subpattern 631 631 632 while(list($key,$val) = each($links[2]))632 foreach ( $links[2] as $key => $val ) 633 633 { 634 634 if(!empty($val)) 635 635 $match[] = $val; 636 636 } 637 637 638 while(list($key,$val) = each($links[3]))638 foreach ( $links[3] as $key => $val ) 639 639 { 640 640 if(!empty($val)) 641 641 $match[] = $val; … … 821 821 { 822 822 if(!is_array($this->rawheaders)) 823 823 $this->rawheaders = (array)$this->rawheaders; 824 while(list($headerKey,$headerVal) = each($this->rawheaders))824 foreach ( $this->rawheaders as $headerKey => $headerVal ) 825 825 $headers .= $headerKey.": ".$headerVal."\r\n"; 826 826 } 827 827 if(!empty($content_type)) { … … 985 985 { 986 986 if(!is_array($this->rawheaders)) 987 987 $this->rawheaders = (array)$this->rawheaders; 988 while(list($headerKey,$headerVal) = each($this->rawheaders))988 foreach ( $this->rawheaders as $headerKey => $headerVal ) 989 989 $headers[] = $headerKey.": ".$headerVal; 990 990 } 991 991 if(!empty($content_type)) { … … 1204 1204 switch ($this->_submit_type) { 1205 1205 case "application/x-www-form-urlencoded": 1206 1206 reset($formvars); 1207 while(list($key,$val) = each($formvars)) {1207 foreach ( $formvars as $key => $val ) { 1208 1208 if (is_array($val) || is_object($val)) { 1209 while (list($cur_key, $cur_val) = each($val)) {1209 foreach ( $val as $cur_key => $cur_val ) { 1210 1210 $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; 1211 1211 } 1212 1212 } else … … 1218 1218 $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); 1219 1219 1220 1220 reset($formvars); 1221 while(list($key,$val) = each($formvars)) {1221 foreach ( $formvars as $key => $val ) { 1222 1222 if (is_array($val) || is_object($val)) { 1223 while (list($cur_key, $cur_val) = each($val)) {1223 foreach ( $val as $cur_key => $cur_val ) { 1224 1224 $postdata .= "--".$this->_mime_boundary."\r\n"; 1225 1225 $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; 1226 1226 $postdata .= "$cur_val\r\n"; … … 1233 1233 } 1234 1234 1235 1235 reset($formfiles); 1236 while (list($field_name, $file_names) = each($formfiles)) {1236 foreach ( $formFiles as $field_name => $file_names ) { 1237 1237 settype($file_names, "array"); 1238 while (list(, $file_name) = each($file_names)) {1238 foreach ( $file_names as $file_name ) { 1239 1239 if (!is_readable($file_name)) continue; 1240 1240 1241 1241 $fp = fopen($file_name, "r");