For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > May 2006 > #37486 [Opn]: Docs do not reflect E_STRICT warning









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #37486 [Opn]: Docs do not reflect E_STRICT warning
brianm-phpbugs at dealnews dot com

2006-05-18, 7:58 am

ID: 37486
User updated by: brianm-phpbugs at dealnews dot com
Reported By: brianm-phpbugs at dealnews dot com
Status: Open
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com