ID: 37486 Updated by: [EMAIL PROTECTED] Reported By: brianm-phpbugs at dealnews dot com Status: Open Bug Type: Documentation problem Operating System: Linux PHP Version: Irrelevant New Comment:
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 :) Previous Comments: ------------------------------------------------------------------------ [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