From 8e19705a93d785cd1ff8ba3a69699b00169fea47 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 20 Jan 2015 21:44:19 +0000 Subject: [PATCH] Fixed bug #55407 (Impossible to prototype DateTime::createFromFormat) --- NEWS | 2 ++ ext/date/php_date.c | 2 +- ext/date/tests/bug55407.phpt | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ext/date/tests/bug55407.phpt diff --git a/NEWS b/NEWS index ac4d5aa3f5f..eeb71e94dd0 100644 --- a/NEWS +++ b/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) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 58e23c0bb5c..fb3eaca9f44 100644 --- a/ext/date/php_date.c +++ b/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) diff --git a/ext/date/tests/bug55407.phpt b/ext/date/tests/bug55407.phpt new file mode 100644 index 00000000000..00c33564618 --- /dev/null +++ b/ext/date/tests/bug55407.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #55407 (Impossible to prototype DateTime::createFromFormat) +--INI-- +error_reporting=-1 +--FILE-- + +--EXPECTF-- +DONE