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