Skip to content

Commit 0b5d819

Browse files
committed
fix(phpstan): Ignore return.never on dead_db()
PHPStan cannot verify that wp_die() always terminates due to its conditional return type and treatPhpDocTypesAsCertain being disabled.
1 parent 254b439 commit 0b5d819

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5521,7 +5521,7 @@ function dead_db() {
55215521
}
55225522

55235523
// Otherwise, be terse.
5524-
wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) );
5524+
wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) ); // @phpstan-ignore return.never (wp_die() always exits by default.)
55255525
}
55265526

55275527
/**

0 commit comments

Comments
 (0)