From: max
Date: Wed May 30 16:33:44 2001
Modified files:
php-lib/php/user4.inc
Log message:
Some sanity checks in register(), is_registered() and unregister()
Index: php-lib/php/user4.inc
diff -u php-lib/php/user4.inc:1.4 php-lib/php/user4.inc:1.5
--- php-lib/php/user4.inc:1.4 Wed May 30 15:16:49 2001
+++ php-lib/php/user4.inc Wed May 30 16:33:13 2001
@@ -4,7 +4,7 @@
*
* @copyright 1998,1999 NetUSE GmbH Boris Erdmann, Kristian Koehntopp
* 2001, Maxim Derkachev <[EMAIL PROTECTED]>
-* @version $Id: user4.inc,v 1.4 2001/05/30 13:16:49 uw Exp $
+* @version $Id: user4.inc,v 1.5 2001/05/30 14:33:13 max Exp $
* @package PHPLib
* @access public
*/
@@ -90,10 +90,9 @@
*/
function register ($things) {
- $things = explode (",", $things);
+ $things = preg_split('/\s*,\s*/', trim($var_names) );
foreach ($things as $thing) {
- $thing = trim($thing);
if (!isset($GLOBALS[$thing]))
continue;
@@ -120,10 +119,9 @@
*/
function unregister($things) {
- $things = explode (",", $things);
+ $things = preg_split('/\s*,\s*/', trim($var_names) );
foreach ($things as $thing) {
- $thing = trim($thing);
if (!isset ($GLOBALS[$this->vars_array][$thing]))
continue;
@@ -190,4 +188,4 @@
} // end class User
-?>
\ No newline at end of file
+?>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]