We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e2d3ca commit 491435fCopy full SHA for 491435f
php/Job/Space/Select.php
@@ -64,13 +64,17 @@ public function run(): array
64
}
65
66
67
- $index_name = $this->getMapper()->find(
68
- '_vindex',
69
- ['id' => $space['id'], 'iid' => $this->index]
70
- )[0]['name'];
+ $index = $this->getMapper()->findOrFail(
+ '_vindex', [
+ 'id' => $space['id'],
+ 'iid' => $this->index
71
+ ]
72
+ );
73
+
74
+ $indexName = $index['name'];
75
76
[$total] = $this->getMapper()->client->call(
- "box.space.$this->space.index.$index_name:count",
77
+ "box.space.$this->space.index.$indexName:count",
78
$key
79
);
80
} catch (Exception) {
0 commit comments