php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17625 Postet Vars are always set, even if not containing any data
Submitted: 2002-06-06 08:43 UTC Modified: 2002-06-06 09:27 UTC
From: nilsheuer at gmx dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.1 OS: Open BSD
Private report: No CVE-ID: None
 [2002-06-06 08:43 UTC] nilsheuer at gmx dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-06 09:27 UTC] mfischer@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

Not going to change.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 02:01:30 2024 UTC