From 0d1ae6a71ddc518f44bff03ae10d50e53f89955b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jun 2011 16:43:44 +0000 Subject: [PATCH] Fix: Avoid error if method not provided --- htdocs/core/class/html.formfile.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 2f1d5c89c1b..701c72f3cf9 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -408,12 +408,13 @@ class FormFile print ''; - // Hook of thirdparty module + // Execute hooks + // $hooks must be array('key'=>$instanceofclass) if (! empty($hooks) && is_array($hooks)) { foreach($hooks as $module) { - $module->formBuilddocOptions(); + if (method_exists($module,'formBuilddocOptions')) $module->formBuilddocOptions(); } } }