| philip@php.net 2006-05-18, 7:01 pm |
| ID: 37486
Updated by: philip@php.net
Reported By: brianm-phpbugs at dealnews dot com
Status: Assigned
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
Assigned To: philip
New Comment:
This error came about in PHP 5.1.0
Previous Comments:
------------------------------------------------------------------------
[2006-05-18 16:29:30] philip@php.net
Whether E_STRICT is in E_ALL does not relate to this bug, this function
emits E_STRICT regardless. And since we document future releases,
including PHP 6, it's still a valid bug. Or wait, maybe it's a feature
request until 5.2.0 is out? ;)
This bug report has been changed to include "all date functions that
result in this error" as I believe all are affected that pass in a
timestamp. If you know of one not in ref.datetime please write that
here. Assigning to self. Creating an entity to include in all such
functions.
------------------------------------------------------------------------
[2006-05-18 12:47:01] brianm-phpbugs at dealnews dot com
E_STRICT is thrown when you set error_reporting to throw it. And
according to the discussion on internals (of which I am a part of),
they want people to develop that way.
Mark it will fix later or whatever, but, this will need to be addressed
as E_STRICT gets more and more steam.
------------------------------------------------------------------------
[2006-05-18 12:09:24] crescentfreshpot at yahoo dot com
E_STRICT is only thrown in latest snaps, not in any official release
(f.e. not in 5.1.4). You can't expect the documentation to be _that_ up
to date.
There is a huge thread on internals going on right now on whether
E_STRICT should be triggered for this sort of thing (i.e. when E_ALL is
set) in the next release.
This is not a doc bug. Not yet at least ;)
------------------------------------------------------------------------
[2006-05-18 06:02:39] philip@php.net
We need a script to check all of php-src (and PECL) for what functions
may emits errors, and document accordingly. E_STRICT and E_WARNING
especially. In fact, it should check return types too. And compare
prototypes. Sounds like a large task so we can simply add E_STRICT info
to strftime() for now :)
------------------------------------------------------------------------
[2006-05-18 04:00:11] brianm-phpbugs at dealnews dot com
Description:
------------
Enabling E_STRICT and using strtotime() yields this error:
Strict Standards: strftime() [function.strftime]: It is not safe to
rely on the system's timezone settings. Please use the date.timezone
setting, the TZ environment variable or the date_default_timezone_set()
function. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in
/www/dev.phorum/phorum5-dev/include/format_functions.php on line 157
However, the docs at http://us3.php.net/function.strftime/ make no
mention of this. I believe if you are going to throw warnings for
things in E_STRICT, it should at least be documented.
Reproduce code:
---------------
use strtotime() without setting a timezone in php.ini
Expected result:
----------------
Documentation would have headed this warning.
Actual result:
--------------
No docs about this being a possible problem.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37486&edit=1
|