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 90acf7e commit 95a5148Copy full SHA for 95a5148
src/Cms/Collections.php
@@ -105,10 +105,11 @@ public function load(string $name): mixed
105
{
106
$kirby = App::instance();
107
108
- // first check for collection file
109
- $file = $kirby->root('collections') . '/' . $name . '.php';
+ // first check for collection file in the `collections` root
+ $root = $kirby->root('collections');
110
+ $file = $root . '/' . $name . '.php';
111
- if (is_file($file) === true) {
112
+ if (F::exists($file, $root) === true) {
113
$collection = F::load($file, allowOutput: false);
114
115
if ($collection instanceof Closure) {
0 commit comments