Commit 9fb88431 by Alexander Makarov

Removed unnecessary variable

parent 135b7b55
...@@ -165,8 +165,7 @@ class Query extends Component implements QueryInterface ...@@ -165,8 +165,7 @@ class Query extends Component implements QueryInterface
*/ */
public function one($db = null) public function one($db = null)
{ {
$options['size'] = 1; $result = $this->createCommand($db)->search(['size' => 1]);
$result = $this->createCommand($db)->search($options);
if (empty($result['hits']['hits'])) { if (empty($result['hits']['hits'])) {
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment