php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3239 Can no longer use undefined variables in boolean statements
Submitted: 2000-01-18 01:07 UTC Modified: 2000-02-11 23:01 UTC
From: nick at bamboo dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: Freebsd 3.3 & Rhat Linux 6.1
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: nick at bamboo dot com
New email:
PHP Version: OS:

 

 [2000-01-18 01:07 UTC] nick at bamboo dot com
Code fragements like the following now generate an error complaining about the use of "undefined variable".  Files which contain code like this will display this error perhaps 20% of the time they load, and display no error the rest of the time.  Simply hitting reload will trigger the error on the same file randomly.

if ( $thisIsUndefined )
  // do something 

I use this often in my code, and this bug has forced me back to beta2 which does not have this problem.  

This is the only serious bug I've ever encountered in PHP.  Not bad. :)  Thanks for the kick ass stuff!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-11 23:01 UTC] andrei at cvs dot php dot net
You simply have to change your error_reporting setting in php.ini
to not display notices.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 13:01:32 2025 UTC