Skip to content

Commit 7327f0c

Browse files
westonruterclaude
andcommitted
Fix check_database_version() return type: void|WP_Error → WP_Error|null
Add explicit return null when the version check passes. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 972bbb6 commit 7327f0c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/wp-includes/class-wpdb.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3998,7 +3998,7 @@ public function close() {
39983998
* @since 2.5.0
39993999
*
40004000
* @global string $required_mysql_version The minimum required MySQL version string.
4001-
* @return void|WP_Error
4001+
* @return WP_Error|null
40024002
*/
40034003
public function check_database_version() {
40044004
global $required_mysql_version;
@@ -4009,6 +4009,8 @@ public function check_database_version() {
40094009
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
40104010
return new WP_Error( 'database_version', sprintf( __( '<strong>Error:</strong> WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) );
40114011
}
4012+
4013+
return null;
40124014
}
40134015

40144016
/**

0 commit comments

Comments
 (0)