Changeset 58409
- Timestamp:
- 06/13/2024 08:48:33 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r58208 r58409 2796 2796 '<code>wp_opcache_invalidate_directory()</code>' 2797 2797 ); 2798 trigger_error($error_message );2798 wp_trigger_error( '', $error_message ); 2799 2799 } 2800 2800 return; -
trunk/src/wp-admin/includes/plugin-install.php
r58402 r58409 175 175 if ( $ssl && is_wp_error( $request ) ) { 176 176 if ( ! wp_is_json_request() ) { 177 trigger_error( 177 wp_trigger_error( 178 __FUNCTION__, 178 179 sprintf( 179 180 /* translators: %s: Support forums URL. */ -
trunk/src/wp-admin/includes/theme.php
r57773 r58409 569 569 if ( $ssl && is_wp_error( $request ) ) { 570 570 if ( ! wp_doing_ajax() ) { 571 trigger_error( 571 wp_trigger_error( 572 __FUNCTION__, 572 573 sprintf( 573 574 /* translators: %s: Support forums URL. */ -
trunk/src/wp-admin/includes/translation-install.php
r54891 r58409 60 60 61 61 if ( $ssl && is_wp_error( $request ) ) { 62 trigger_error( 62 wp_trigger_error( 63 __FUNCTION__, 63 64 sprintf( 64 65 /* translators: %s: Support forums URL. */ -
trunk/src/wp-admin/includes/update.php
r58064 r58409 146 146 147 147 if ( $ssl && is_wp_error( $response ) ) { 148 trigger_error( 148 wp_trigger_error( 149 __FUNCTION__, 149 150 sprintf( 150 151 /* translators: %s: Support forums URL. */ -
trunk/src/wp-admin/link-parse-opml.php
r55917 r58409 79 79 // Create an XML parser. 80 80 if ( ! function_exists( 'xml_parser_create' ) ) { 81 trigger_error(__( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );81 wp_trigger_error( '', __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 82 82 wp_die( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 83 83 } -
trunk/src/wp-includes/block-template-utils.php
r58323 r58409 253 253 WP_TEMPLATE_PART_AREA_UNCATEGORIZED 254 254 ); 255 trigger_error( $warning_message, E_USER_NOTICE);255 wp_trigger_error( __FUNCTION__, $warning_message ); 256 256 return WP_TEMPLATE_PART_AREA_UNCATEGORIZED; 257 257 } -
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r58354 r58409 505 505 $json_decoding_error = json_last_error(); 506 506 if ( JSON_ERROR_NONE !== $json_decoding_error ) { 507 trigger_error('Error when decoding a theme.json schema for user data. ' . json_last_error_msg() );507 wp_trigger_error( __METHOD__, 'Error when decoding a theme.json schema for user data. ' . json_last_error_msg() ); 508 508 /** 509 509 * Filters the data provided by the user for global styles & settings. -
trunk/src/wp-includes/class-wp-theme-json.php
r58354 r58409 3776 3776 || ( '+' !== $spacing_scale['operator'] && '*' !== $spacing_scale['operator'] ) ) { 3777 3777 if ( ! empty( $spacing_scale ) ) { 3778 trigger_error( 3778 wp_trigger_error( 3779 __METHOD__, 3779 3780 sprintf( 3780 3781 /* translators: 1: theme.json, 2: settings.spacing.spacingScale */ -
trunk/src/wp-includes/feed.php
r58200 r58409 588 588 589 589 if ( ! function_exists( 'xml_parser_create' ) ) { 590 trigger_error(__( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );590 wp_trigger_error( '', __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); 591 591 592 592 return array( 'html', "<![CDATA[$data]]>" ); -
trunk/src/wp-includes/formatting.php
r58147 r58409 5519 5519 /* 5520 5520 * To maintain consistency with pre-PHP 8 error levels, 5521 * trigger_error() is used to trigger an E_USER_WARNING,5521 * wp_trigger_error() is used to trigger an E_USER_WARNING, 5522 5522 * rather than _doing_it_wrong(), which triggers an E_USER_NOTICE. 5523 5523 */ 5524 trigger_error( 5524 wp_trigger_error( 5525 '', 5525 5526 sprintf( 5526 5527 /* translators: 1: The function name, 2: The argument number, 3: The argument name, 4: The expected type, 5: The provided type. */ -
trunk/src/wp-includes/functions.php
r58361 r58409 4612 4612 4613 4613 if ( ! $filename ) { 4614 trigger_error( 4614 wp_trigger_error( 4615 __FUNCTION__, 4615 4616 sprintf( 4616 4617 /* translators: %s: Path to the JSON file. */ … … 4626 4627 4627 4628 if ( JSON_ERROR_NONE !== json_last_error() ) { 4628 trigger_error( 4629 wp_trigger_error( 4630 __FUNCTION__, 4629 4631 sprintf( 4630 4632 /* translators: 1: Path to the JSON file, 2: Error message. */ … … 8758 8760 function clean_dirsize_cache( $path ) { 8759 8761 if ( ! is_string( $path ) || empty( $path ) ) { 8760 trigger_error( 8762 wp_trigger_error( 8763 '', 8761 8764 sprintf( 8762 8765 /* translators: 1: Function name, 2: A variable type, like "boolean" or "integer". */ -
trunk/src/wp-includes/ms-default-constants.php
r56192 r58409 148 148 149 149 if ( $subdomain_error_warn ) { 150 trigger_error( 150 wp_trigger_error( 151 __FUNCTION__, 151 152 sprintf( 152 153 /* translators: 1: VHOST, 2: SUBDOMAIN_INSTALL */ -
trunk/src/wp-includes/rss.php
r57370 r58409 64 64 # 65 65 if ( ! function_exists('xml_parser_create') ) { 66 return trigger_error( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ); 66 wp_trigger_error( '', "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ); 67 return; 67 68 } 68 69 … … 388 389 function error( $errormsg, $lvl = E_USER_WARNING ) { 389 390 if ( MAGPIE_DEBUG ) { 390 trigger_error($errormsg, $lvl);391 wp_trigger_error('', $errormsg, $lvl); 391 392 } else { 392 393 error_log( $errormsg, 0); … … 824 825 $this->ERROR = $errormsg; 825 826 if ( MAGPIE_DEBUG ) { 826 trigger_error($errormsg, $lvl);827 wp_trigger_error( '', $errormsg, $lvl); 827 828 } 828 829 else { -
trunk/src/wp-includes/theme.php
r58366 r58409 515 515 $dirs = @ scandir( $theme_root ); 516 516 if ( ! $dirs ) { 517 trigger_error( "$theme_root is not readable", E_USER_NOTICE);517 wp_trigger_error( __FUNCTION__, "$theme_root is not readable" ); 518 518 continue; 519 519 } … … 539 539 $sub_dirs = @ scandir( $theme_root . '/' . $dir ); 540 540 if ( ! $sub_dirs ) { 541 trigger_error( "$theme_root/$dir is not readable", E_USER_NOTICE);541 wp_trigger_error( __FUNCTION__, "$theme_root/$dir is not readable" ); 542 542 continue; 543 543 } -
trunk/src/wp-includes/update.php
r56559 r58409 203 203 204 204 if ( $ssl && is_wp_error( $response ) ) { 205 trigger_error( 205 wp_trigger_error( 206 __FUNCTION__, 206 207 sprintf( 207 208 /* translators: %s: Support forums URL. */ … … 441 442 442 443 if ( $ssl && is_wp_error( $raw_response ) ) { 443 trigger_error( 444 wp_trigger_error( 445 __FUNCTION__, 444 446 sprintf( 445 447 /* translators: %s: Support forums URL. */ … … 722 724 723 725 if ( $ssl && is_wp_error( $raw_response ) ) { 724 trigger_error( 726 wp_trigger_error( 727 __FUNCTION__, 725 728 sprintf( 726 729 /* translators: %s: Support forums URL. */ -
trunk/tests/phpunit/tests/filesystem/wpOpcacheInvalidateDirectory.php
r56971 r58409 38 38 $this->expectError(); 39 39 $this->expectErrorMessage( 40 '<code>wp_opcache_invalidate_directory()</code> ',40 '<code>wp_opcache_invalidate_directory()</code> expects a non-empty string.', 41 41 'The expected error was not triggered.' 42 42 );
Note: See TracChangeset
for help on using the changeset viewer.