Bug #17625: Postet Vars are always set, even if not containing any data
| From: | nilsheuer at gmx dot de | Date: | Thu, 06 Jun 2002 12:43:42 +0000 |
| Subject: | Bug #17625: Postet Vars are always set, even if not containing any data | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-9633@lists.php.net to get a copy of this message | ||
From: nilsheuer@gmx.de
Operating system: Open BSD
PHP version: 4.2.1
PHP Bug Type: Variables related
Bug description: Postet Vars are always set, even if not containing any data
Just updated to php 4.2.1 a week ago (former version php 4.0.4). For
backward compatibility, turned register_globals on.
Now, after sending a form (method=post) with empty fields, their
corresponding vars are created. That doesnot make any sense to me, since
they dont contain any date. IMO php 4.0.4 was right, not to create them.
The Problem is this:
after posting, users normally write something like
if(isset($my_posted_var))
{
//true, only if $my_posted_vars has a value
...
}
Now, users must do the following
if(!empty($my_posted_var)) and so on.
Why initialising empty vars? This looks like overhead to me.
And, i dont want to rewrite my whole scripts, if it is a bug and not a
feature.
Best regards
Nila
--
Edit bug report at http://bugs.php.net/?id=17625&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17625&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17625&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17625&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17625&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17625&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17625&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17625&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17625&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17625&r=globals