Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/wp-includes/class-wpdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1453,11 +1453,11 @@
* individual arguments.
* @param mixed ...$args Further variables to substitute into the query's placeholders
* if being called with individual arguments.
* @return string|void Sanitized query string, if there is a query to prepare.
* @return string|null Sanitized query string, if there is a query to prepare.
*/
public function prepare( $query, ...$args ) {
if ( is_null( $query ) ) {
return;
return null;
}

/*
Expand Down Expand Up @@ -2117,7 +2117,7 @@
* @since 3.9.0
*
* @param bool $allow_bail Optional. Allows the function to bail. Default true.
* @return bool|void True if the connection is up.
* @return bool True if the connection is up.
Comment thread
apermo marked this conversation as resolved.
Outdated
*/
public function check_connection( $allow_bail = true ) {
// Check if the connection is alive.
Expand Down Expand Up @@ -2193,7 +2193,7 @@
* Call dead_db() if bail didn't die, because this database is no more.
* It has ceased to be (at least temporarily).
*/
dead_db();

Check warning on line 2196 in src/wp-includes/class-wpdb.php

View workflow job for this annotation

GitHub Actions / PHP static analysis / Run PHP static analysis

Method wpdb::check_connection() should return bool but return statement is missing.
Comment thread
apermo marked this conversation as resolved.
}

/**
Expand Down Expand Up @@ -3056,7 +3056,7 @@
* correspond to an stdClass object, an associative array, or a numeric array,
* respectively. Default OBJECT.
* @param int $y Optional. Row to return. Indexed from 0. Default 0.
* @return array|object|null|void Database query result in format specified by $output or null on failure.
* @return array|object|null Database query result in format specified by $output or null on failure.
*/
public function get_row( $query = null, $output = OBJECT, $y = 0 ) {
$this->func_call = "\$db->get_row(\"$query\",$output,$y)";
Expand Down
Loading