From 0cdf6e8d8f1294ce544b22612ac0ed0f7fd270e4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 06:57:52 +0000 Subject: [PATCH] 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 --- code/WidgetAreaEditor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/WidgetAreaEditor.php b/code/WidgetAreaEditor.php index 035d6e07..6fb7b829 100644 --- a/code/WidgetAreaEditor.php +++ b/code/WidgetAreaEditor.php @@ -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;