diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php
index 2498ed042318d395246fd681f5d6fd96ef2ec6f1..394bbdeb021c28da1e70e0737aeff49a4b580a92 100644
--- a/core/lib/Drupal/Core/Database/Query/Select.php
+++ b/core/lib/Drupal/Core/Database/Query/Select.php
@@ -287,7 +287,7 @@ public function having($snippet, $args = array()) {
   }
 
   public function havingCompile(Connection $connection) {
-    return $this->having->compile($connection, $this);
+    $this->having->compile($connection, $this);
   }
 
   /* Implementations of Drupal\Core\Database\Query\ExtendableInterface. */