Re: PHP 4.0 Bug #5368: Frequently undefined variable errors
| From: | eschmid+sic at s dot netic dot de | Date: | Mon, 03 Jul 2000 23:09:05 +0000 |
| Subject: | Re: PHP 4.0 Bug #5368: Frequently undefined variable errors | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23387@lists.php.net to get a copy of this message | ||
On Tue, Jul 04, 2000 at 10:13:07PM -0000, adamek@webtrio.de wrote:
> 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];
A PHP 4 designer should write $stringtext = $stringarray["ELEMENT1"]. Note
that this is listed in the incompatibility list.
-Egon