PHP 4.0 Bug #9237 Updated: date function parameters won't work on PWS
| From: | derick@php.net | Date: | Tue, 20 Feb 2001 07:28:35 +0000 |
| Subject: | PHP 4.0 Bug #9237 Updated: date function parameters won't work on PWS | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47001@lists.php.net to get a copy of this message | ||
ID: 9237
Updated by: derick
Reported By: ajandris@parks.lv
Status: Bogus
Bug Type: Date/time related
Assigned To:
Comments:
The usage of $dat[mon] is not the way it shoudl work. Without the "'s, it's not
possible for PHP to see whether mon is a constant, or an index. Therefore you should always use
"mon" if you want mon to be the index of your array.
Previous Comments:
---------------------------------------------------------------------------
[2001-02-20 01:56:00] ajandris@parks.lv
Yes, the message I received is like this ...
I didn't receive that before.
Suggestions: don't set error reporting by default so high in installation wizard for win32
binaries.
Thanx,
Andris
---------------------------------------------------------------------------
[2001-02-13 12:44:48] cynic@php.net
I bet the text of the errmsg is somethign like this:
Warning: Use of undefined constant x - assumed 'x' in ... on line ...
this is caused by error_reporting set high enough to trigger this warning.
---------------------------------------------------------------------------
[2001-02-13 05:26:30] ajandris@parks.lv
On linux (built in) and IIS 4.0 (cgi vers) on nt4.0 wrkst i can use function for example:
function getThisMonth(){
$dat=getdate();
return $dat[mon];
}
without problem.
On pws it reproduces error (description I don't remember -> it happens at home)
I should put mon in double quotes '"'. Then it works.
This error happens with other parameters like nmon, year ...
With quotes it works on linux and IIS 4.0 too.
Thanks,
Andris
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9237&edit=2