From 4492f1a730d91ebf306075ff80807da5a996bbad Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 27 Feb 2026 17:04:55 -0800 Subject: [PATCH] Add phpstan-assert-if-true to is_wp_error() --- src/wp-includes/load.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 90318acdddcb4..27c58b57dd671 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -1798,6 +1798,8 @@ function wp_doing_cron() { * * @param mixed $thing The variable to check. * @return bool Whether the variable is an instance of WP_Error. + * + * @phpstan-assert-if-true WP_Error $thing */ function is_wp_error( $thing ) { $is_wp_error = ( $thing instanceof WP_Error );