[PR][php-src][#1167][PHP-5.5] - Bug #68669 DateTime::createFromFormat() does not allow NULL $timezone

From: Date: Wed, 11 Mar 2015 03:25:42 +0000
Subject: [PR][php-src][#1167][PHP-5.5] - Bug #68669 DateTime::createFromFormat() does not allow NULL $timezone
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-2713@lists.php.net to get a copy of this message
You can view the Pull Request on github: https://github.com/php/php-src/pull/1167 Pull Request Description: DateTime::createFromFormat($format, $time, DateTimeZone $timezone = null) has a default value for its third parameter $timezone, but it doesn't accept null as a value. Running the following script will raise a warning: DateTime::createFromFormat('Y/m/d', '2015/1/1', null); // Warning: DateTime::createFromFormat() expects parameter 3 to be DateTimeZone, null given While the documentation states that the default timezone is going to be used when no parameter is given, also the case where a null $timezone is given should be handled correctly. This would align the API to the language semantics about default values.

« previous php.git-pulls (#2713) next »