PHP 4.0 Bug #5368: Frequently undefined variable errors
| From: | adamek at webtrio dot de | Date: | Tue, 04 Jul 2000 22:13:07 +0000 |
| Subject: | PHP 4.0 Bug #5368: Frequently undefined variable errors | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-23379@lists.php.net to get a copy of this message | ||
From: adamek@webtrio.de
Operating system: Linux 2.2.16 / SuSE 6.4
PHP version: 4.0.1
PHP Bug Type: Scripting Engine problem
Bug description: Frequently undefined variable errors
Since upgrading to PHP 4.0.1 I'm not so happy with all "features" in PHP ...
sometimes the message
"Undefined variable Var_Name" appears where "Var_Name" is e.g. the name of a URL
parameter of the page which causes the trouble in an if clause if it is not present. This happens as
more usual as longer the apache process runs.
An example can be watched on http://www.porschedesign.de
The code which causes the problem, is:
This line (near the beginning of the page) >>>> if ($wkID == "")
{
$wkID = create_warenkorb();
}
What's the matter with following statements: In PHP3 the following code works o.k.:
$stringtext = $stringarray[ELEMENT1];
In PHP sometimes I get the message:
WARNING: Undefined constant or variable ELEMENT1, maybe it is 'ELEMENT1'
Can I suppress this message because I think it was allowed in PHP3?
Kind regards
Thomas