php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9679 undefined variable
Submitted: 2001-03-11 02:35 UTC Modified: 2002-07-17 18:03 UTC
From: emir_p at yahoo dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.0.4pl1 OS: W2K
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: emir_p at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-03-11 02:35 UTC] emir_p at yahoo dot com
Warning: Undefined variable: currYear in c:\inetpub\wwwroot\calendar\month.view.php on line 29
this is the code that is causing this
if(!$currYear) { $currYear = date("Y"); }

I found some examples that have $variable++ but the variable is not predefined, and some other examples like
if (!$submit) {} also give warnings "undefined variable"...
On a couple of forums I've found the same problem, but no solution..is it a configuration problem or a bug???? People that wrote those examples did not seem to have those problems.
thanks for help

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-17 17:57 UTC] Bas at Synthetical dot com
Solution?????
 [2002-07-17 18:03 UTC] cynic@php.net
1) way too old PHP version
2) user error, FAQ

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 07:01:24 2020 UTC