Skip to content

Commit

Permalink
always return a new instance of a cell (codeigniter4#8330)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Dec 15, 2023
1 parent ad0fb2c commit fc17a53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions system/View/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ protected function determineClass(string $library): array
}

// locate and return an instance of the cell
// @TODO extend Factories to be able to load classes with the same short name.
$object = class_exists($class) ? new $class() : Factories::cells($class);
$object = Factories::cells($class, ['getShared' => false]);

if (! is_object($object)) {
throw ViewException::forInvalidCellClass($class);
Expand Down

0 comments on commit fc17a53

Please sign in to comment.