Bug #2100: Problems with ? : arrays and isset
| From: | drew at elysium dot ltd dot uk | Date: | Wed, 18 Aug 1999 08:55:13 +0000 |
| Subject: | Bug #2100: Problems with ? : arrays and isset | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9968@lists.php.net to get a copy of this message | ||
From: drew@elysium.ltd.uk
Operating system: Linux RH 6.0
PHP version: 3.0.12
PHP Bug Type: Misbehaving function
Bug description: Problems with ? : arrays and isset
<?
$x = isSet($x) ? "Set" : "Not Set";
$y["x"] = isSet($y["x"]) ? "Set" : "Not Set";
if (isSet($z["x"]))
$z["x"] = "Set";
else
$z["x"] = "Not Set";
print "x = " . $x . "<BR>\n";
print "y[\"x\"] = " . $y["x"] . "<BR>\n";
print "z[\"x\"] = " . $z["x"] . "<BR>\n";
?>
$x gets set to "Not Set" - Correct
$y["x"] gets set to "Set" - Not Correct
$y["x"] gets set to "Not Set" - Correct
This problem does not happen in 4.0b2 only in 3.0.12 (and I suppose other versions of php3.0.x)
Rgds Drew
The variables is question have never been used before, as can be seen.