Skip to content

Commit cffb2a2

Browse files
westonruterclaude
andcommitted
Fix print_error() return type: void|false → null|false
Add explicit return null at the end of the method to match the documented return type. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 612def3 commit cffb2a2

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
@@ -1794,7 +1794,7 @@ public function esc_like( $text ) {
17941794
* @global array $EZSQL_ERROR Stores error information of query and error string.
17951795
*
17961796
* @param string $str The error to display.
1797-
* @return void|false Void if the showing of errors is enabled, false if disabled.
1797+
* @return null|false Null if the showing of errors is enabled, false if disabled.
17981798
*/
17991799
public function print_error( $str = '' ) {
18001800
global $EZSQL_ERROR;
@@ -1855,6 +1855,8 @@ public function print_error( $str = '' ) {
18551855
$query
18561856
);
18571857
}
1858+
1859+
return null;
18581860
}
18591861

18601862
/**

0 commit comments

Comments
 (0)