|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-03-22 04:08 UTC] laruence@php.net
-Status: Open
+Status: Not a bug
[2013-03-22 04:08 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 20:00:01 2025 UTC |
Description: ------------ When creating a new DateTimeZone with an invalid tz name, the documentation states that it will emit an exception. This happens, however.. a notice is also emitted, although not immediately visible. This notice pops its head up when calling error_get_last(). Test script: --------------- php -d error_reporting=-1 -d display_errors=1 -r ' try { @new DateTimeZone("YOUR MOM"); } catch (Exception $e) {} print_r( error_get_last() ); '; Expected result: ---------------- NULL Actual result: -------------- Array ( [type] => 2 [message] => DateTimeZone::__construct(): Unknown or bad timezone (YOUR MOM) [file] => Command line code [line] => 1 )