Re: cvs: php4 /pear/HTML Menu.php

From: Date: Wed, 12 Sep 2001 17:23:07 +0000
Subject: Re: cvs: php4 /pear/HTML Menu.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-836@lists.php.net to get a copy of this message
On Wednesday 12 September 2001 17:55, Martin Jansen wrote: > mj Wed Sep 12 11:55:41 2001 EDT > > Modified files: > /php4/pear/HTML Menu.php > Log: > * Patch by Ronald van den Berg <vandenberg@auxilium-sd.nl> > > > function getCurrentURL() { > - return $GLOBALS[$this->url_env_var]; > + return $this->url_env_var; > } This patch will break the functionality of the class. The url_env_var is used to find where you are. By default is 'PHP_SELF', so it uses: $GLOBALS['PHPSELF'], or you could use REQUEST_URI for example. But whithout the $GLOBALS, by default the function will return the string 'PHP_SELF' breaking the detection mechanism. At least the patch could be (not tested), something like: if (!isset($GLOBALS[$this->url_env_var]) { return $this->url_env_var; } return $GLOBALS[$this->url_env_var]; If not, IMHO should be reverted. Tomas V.V.Cox

« previous php.pear.cvs (#836) next »