Bug #2468: Inconsistent description of unset variables passed to functions
| From: | jaker at more dot com | Date: | Fri, 08 Oct 1999 19:24:42 +0000 |
| Subject: | Bug #2468: Inconsistent description of unset variables passed to functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11632@lists.php.net to get a copy of this message | ||
From: jaker@more.com
Operating system: Solaris 2.6
PHP version: 3.0.12
PHP Bug Type: Misbehaving function
Bug description: Inconsistent description of unset variables passed to functions
Suppose there is a function which takes one argument. If an unset variable is passed to the
function it is reported as not being set, but it is reported as being a string.
For example:
function foo($var) {
if(isset($var)) {
echo "Argument is set.";
}
if(is_string($var)) {
echo "Argument is a string.";
}
}
foo($nonExistentVar);
This will output:
Argument is a string.
Thus, PHP considers $nonExistentVar to be both unset *and* a string at the same time.