Browse Source

Fixed bug #55407 (Impossible to prototype DateTime::createFromFormat)

pull/1038/head
Derick Rethans 12 years ago
parent
commit
8e19705a93
  1. 2
      NEWS
  2. 2
      ext/date/php_date.c
  3. 17
      ext/date/tests/bug55407.phpt

2
NEWS

@ -4,6 +4,8 @@ PHP NEWS
- Date:
. Fixed bug #45081 (strtotime incorrectly interprets SGT time zone). (Derick)
. Fixed bug #55407 (Impossible to prototype DateTime::createFromFormat).
(Derick, Felipe)
- Dba:
. Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)

2
ext/date/php_date.c

@ -163,7 +163,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create_from_format, 0, 0, 2)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, time)
ZEND_ARG_INFO(0, object)
ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 1)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_parse, 0, 0, 1)

17
ext/date/tests/bug55407.phpt

@ -0,0 +1,17 @@
--TEST--
Bug #55407 (Impossible to prototype DateTime::createFromFormat)
--INI--
error_reporting=-1
--FILE--
<?php namespace melt\core;
class DateTime extends \DateTime {
public static function createFromFormat($format, $time, DateTimeZone $timezone = null) {
return new DateTime(parent::createFromFormat($format, $time, $timezone));
}
}
echo "DONE\n";
?>
--EXPECTF--
DONE
Loading…
Cancel
Save