mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Merge pull request #117 from steiha/patch-1
ItemsToRender might return NULL // avoid warnings
This commit is contained in:
commit
04131d5b09
@ -30,14 +30,15 @@ class WidgetArea extends DataObject
|
||||
public function WidgetControllers()
|
||||
{
|
||||
$controllers = new ArrayList();
|
||||
$items = $this->ItemsToRender();
|
||||
if (!is_null($items)){
|
||||
foreach ($items as $widget) {
|
||||
$controller = $widget->getController();
|
||||
|
||||
foreach ($this->ItemsToRender() as $widget) {
|
||||
$controller = $widget->getController();
|
||||
|
||||
$controller->init();
|
||||
$controllers->push($controller);
|
||||
$controller->init();
|
||||
$controllers->push($controller);
|
||||
}
|
||||
}
|
||||
|
||||
return $controllers;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user