BUGFIX: Fixed a PHP segfault bug with the WidgetAreaEditor (from r96868)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102703 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 06:57:52 +00:00
parent c9df94a7af
commit 0cdf6e8d8f

View File

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