From 35833c25839a60065aa22782fae23aaf0f408f64 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 9 Nov 2005 13:54:36 +0000 Subject: [PATCH] fixed not working reference assignment --- phpgwapi/inc/common_functions.inc.php | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index eb6c03fd1a..fc910c54c9 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -1,13 +1,12 @@ * + * eGroupWare API - commonly used functions included by eGW AND setup * + * The file was originaly written by Dan Kuykendall * * and Joseph Engo * - * Has a few functions, but primary role is to load the phpgwapi * * Copyright (C) 2000, 2001 Dan Kuykendall * * -------------------------------------------------------------------------* * This library is part of the eGroupWare API * - * http://www.egroupware.org/api * + * http://www.egroupware.org * * ------------------------------------------------------------------------ * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published by * @@ -49,11 +48,11 @@ } /** - * print debug data only when debugging mode is turned on. - * - * @author seek3r - * This function is used to debugging data. - * print_debug('this is some debugging data',$somevar); + * print debug data only when debugging mode is turned on. + * + * @author seek3r + * This function is used to debugging data. + * print_debug('this is some debugging data',$somevar); */ function print_debug($message,$var = 'messageonly',$part = 'app', $level = 3) { @@ -269,11 +268,11 @@ } /** - * Validate data. - * - * @author seek3r - * This function is used to validate input data. - * sanitize('number',$somestring); + * Validate data. + * + * @author seek3r + * This function is used to validate input data. + * sanitize('number',$somestring); */ function sanitize($string,$type) { @@ -754,13 +753,14 @@ list($appname,$classname,$functionname) = explode(".", $method); if (!is_object($GLOBALS[$classname])) { + // please note: no reference assignment (=&) here, as $GLOBALS is a reference itself!!! if ($classparams != '_UNDEF_' && ($classparams || $classparams != 'True')) { - $GLOBALS[$classname] =& CreateObject($appname.'.'.$classname, $classparams); + $GLOBALS[$classname] = CreateObject($appname.'.'.$classname, $classparams); } else { - $GLOBALS[$classname] =& CreateObject($appname.'.'.$classname); + $GLOBALS[$classname] = CreateObject($appname.'.'.$classname); } }