Skip to content

Commit c521787

Browse files
committed
Fix return type of AbstractObject\Dao::getPermissions - related to pimcore#15778
1 parent 6257165 commit c521787

File tree

1 file changed

+1
-1
lines changed
  • models/DataObject/AbstractObject

1 file changed

+1
-1
lines changed

models/DataObject/AbstractObject/Dao.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ public function getPermissions($type, $user, $quote = true)
634634
$orderByType = $type ? ', `' . $type . '` DESC' : '';
635635
$permissions = $this->db->fetchAssociative('SELECT ' . $queryType . ' FROM users_workspaces_object WHERE cid IN (' . implode(',', $parentIds) . ') AND userId IN (' . implode(',', $userIds) . ') ORDER BY LENGTH(cpath) DESC, FIELD(userId, ' . $user->getId() . ') DESC' . $orderByType . ' LIMIT 1');
636636

637-
return $permissions;
637+
return $permissions ?: null;
638638
} catch (\Exception $e) {
639639
Logger::warn('Unable to get permission ' . $type . ' for object ' . $this->model->getId());
640640
}

0 commit comments

Comments
 (0)