BUGFIX: Fixed a PHP segfault bug with the WidgetAreaEditor

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96868 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-01-13 05:54:25 +00:00
parent 4f07a30a6b
commit ec990131dc

View File

@ -46,6 +46,9 @@ class WidgetAreaEditor extends FormField {
} }
function UsedWidgets() { function UsedWidgets() {
// Call class_exists() to load Widget.php earlier and avoid a segfault
class_exists('Widget');
$relationName = $this->name; $relationName = $this->name;
$widgets = $this->form->getRecord()->getComponent($relationName)->Items(); $widgets = $this->form->getRecord()->getComponent($relationName)->Items();
return $widgets; return $widgets;