[dev] Re: [cvs] commit: framework/Util Util.php

Michael M Slusarz slusarz at bigworm.colorado.edu
Mon Mar 8 11:15:32 PST 2004


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael M Slusarz <slusarz at bigworm.colorado.edu>:
>
>> slusarz     2004/03/08 10:30:37 PST
>>
>>   Modified files:
>>     Util                 Util.php
>>   Log:
>>   No need to add a parameter to a URL if the value is empty (i.e.
>>   'foo.php?value1=foo&value2=' is no different than 'foo.php?value1=foo').
>
> That's not quite correct. value2 will be an empty $_GET['value2'] and that
> makes a difference in some cases, for example in my recent fix for the
> maintenance/frameset problem. Though we use post values there.

Huh.  Any reason why you are checking for an empty parameter then?  I 
personally
can't think of a reason why an empty parameter would be useful (i.e. checking
whether a parameter exists vs. checking if a parameter is empty _should_
produce the same results).  If you need someway to tell whether a 
parameter has
been processed, then a much cleaner solution is a separate paremeter that
contains a non-zero value, at least in my opinion.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the dev mailing list