Skip to content

Commit 199ae6b

Browse files
authored
Merge branch 'WordPress:trunk' into trunk
2 parents 7e66724 + 7c6ea91 commit 199ae6b

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/wp-admin/network.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) {
4141
wp_die(
42-
printf(
42+
sprintf(
4343
/* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */
4444
__( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ),
4545
'<code>WP_ALLOW_MULTISITE</code>',

src/wp-includes/functions.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3775,13 +3775,15 @@ function wp_nonce_ays( $action ) {
37753775
*
37763776
* @global WP_Query $wp_query WordPress Query object.
37773777
*
3778-
* @param string|WP_Error $message Optional. Error message. If this is a WP_Error object,
3779-
* and not an Ajax or XML-RPC request, the error's messages are used.
3780-
* Default empty string.
3781-
* @param string|int $title Optional. Error title. If `$message` is a `WP_Error` object,
3782-
* error data with the key 'title' may be used to specify the title.
3783-
* If `$title` is an integer, then it is treated as the response code.
3784-
* Default empty string.
3778+
* @param string|WP_Error|int $message Optional. Error message. If this is a WP_Error object,
3779+
* and not an Ajax or XML-RPC request, the error's messages are used.
3780+
* An integer is echoed as the entire response body by legacy Ajax
3781+
* handlers, which use -1 for a failed nonce or capability check,
3782+
* 0 for failure, and 1 for success. Default empty string.
3783+
* @param string|int $title Optional. Error title. If `$message` is a `WP_Error` object,
3784+
* error data with the key 'title' may be used to specify the title.
3785+
* If `$title` is an integer, then it is treated as the response code.
3786+
* Default empty string.
37853787
* @param string|array|int $args {
37863788
* Optional. Arguments to control behavior. If `$args` is an integer, then it is treated
37873789
* as the response code. Default empty array.
@@ -3801,7 +3803,7 @@ function wp_nonce_ays( $action ) {
38013803
* @type bool $exit Whether to exit the process after completion. Default true.
38023804
* }
38033805
* @return void Never returns if `$args['exit']` is true (the default), otherwise returns void.
3804-
*
3806+
* @phpstan-param string|WP_Error|int<-1, max> $message
38053807
* @phpstan-return ( $args is array{exit: false} ? void : never )
38063808
*/
38073809
function wp_die( $message = '', $title = '', $args = array() ) {

0 commit comments

Comments
 (0)