Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit b0a3783

Browse files
christianrrbinal-7span
authored andcommitted
Fixed null pointer exception in fetchItems (#1119)
Fixed an issue, that fetchItems raises a null pointer exception when a table gateway with no ACL is used (set to 'false')
1 parent 2b73fd4 commit b0a3783

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/Directus/Database/TableGateway/RelationalTableGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ public function fetchItems(array $params = [], \Closure $queryCallback = null)
12081208
}, $results);
12091209
}
12101210

1211-
if ($statusField && $this->acl->getCollectionStatuses($this->table)) {
1211+
if ($statusField && $this->acl != null && $this->acl->getCollectionStatuses($this->table)) {
12121212
foreach ($results as $index => &$item) {
12131213
$statusId = ArrayUtils::get($item, $statusField->getName());
12141214
$blacklist = $this->acl->getReadFieldBlacklist($this->table, $statusId);

0 commit comments

Comments
 (0)