diff --git a/core/lib/Drupal/Core/Database/Php7StatementTrait.php b/core/lib/Drupal/Core/Database/Php7StatementTrait.php index 08f689f123..27827cbe41 100644 --- a/core/lib/Drupal/Core/Database/Php7StatementTrait.php +++ b/core/lib/Drupal/Core/Database/Php7StatementTrait.php @@ -25,7 +25,7 @@ trait Php7StatementTrait { * A result, formatted according to $mode. */ public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL) { - $this->doFetch($mode, $cursor_orientation, $cursor_offset); + return $this->doFetch($mode, $cursor_orientation, $cursor_offset); } } diff --git a/core/lib/Drupal/Core/Database/Php8StatementTrait.php b/core/lib/Drupal/Core/Database/Php8StatementTrait.php index 3b6749f267..7224e545b5 100644 --- a/core/lib/Drupal/Core/Database/Php8StatementTrait.php +++ b/core/lib/Drupal/Core/Database/Php8StatementTrait.php @@ -25,7 +25,7 @@ trait Php8StatementTrait { * A result, formatted according to $mode. */ public function fetch(int $mode = \PDO::FETCH_BOTH, int $cursor_orientation = \PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) { - $this->doFetch($mode, $cursor_orientation, $cursor_offset); + return $this->doFetch($mode, $cursor_orientation, $cursor_offset); } }