[PHP-DEV] PHP 4.0 Bug #5368: Frequently undefined variable errors From: adamek <email protected>
Date: 07/04/00

From: adamek <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>