php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5368 Frequently undefined variable errors
Submitted: 2000-07-05 00:13 UTC Modified: 2000-07-05 00:23 UTC
From: adamek at webtrio dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1 OS: Linux 2.2.16 / SuSE 6.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: adamek at webtrio dot de
New email:
PHP Version: OS:

 

 [2000-07-05 00:13 UTC] adamek at webtrio dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-05 00:23 UTC] rasmus at cvs dot php dot net
Yeah, this has been fixed in CVS now.  Until you upgrade to
the next version, you can put: error_reporting(E_ERROR)
at the top of your script and these warnings should go away.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 17:00:01 2026 UTC