From d7f92041c2e1f25ba54e98d280670ef24181f5ed Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 24 Feb 2012 13:56:32 +0800 Subject: [PATCH] Fix: define an array by default if not exist --- htdocs/core/class/conf.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 7fdd4ac5731..ca15812b1fa 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Jean Heimburger * @@ -160,6 +160,7 @@ class Conf $modulename = strtolower($reg[1]); $partname = strtolower($reg[2]); $varname = $partname.'_modules'; + $this->$varname = array(); $arrValue = unserialize($value); if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue; else $value = ($value == 1 ? '/'.$modulename.'/core/'.$partname.'/' : $value);