Skip to content

Commit c193ce7

Browse files
committed
fix: view_cell() cannot load classes with the same short name
1 parent ff3dd1c commit c193ce7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/View/Cell.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ protected function determineClass(string $library): array
178178
}
179179

180180
// locate and return an instance of the cell
181-
$object = Factories::cells($class);
181+
// @TODO extend Factories to be able to load classes with the same short name.
182+
$object = class_exists($class) ? new $class() : Factories::cells($class);
182183

183184
if (! is_object($object)) {
184185
throw ViewException::forInvalidCellClass($class);

0 commit comments

Comments
 (0)