summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2015-01-20 21:44:25 +0000
committerDerick Rethans <github@derickrethans.nl>2015-01-20 21:44:25 +0000
commit1d09926e333148b19ac24e630be8ff209c69b371 (patch)
tree2adf92b36f13976f783e2a1900e1ef52034a4fab
parent73a5958e67dadfdded866fc796556bd0c37360d2 (diff)
parent8e19705a93d785cd1ff8ba3a69699b00169fea47 (diff)
downloadphp-git-1d09926e333148b19ac24e630be8ff209c69b371.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
-rw-r--r--ext/date/php_date.c2
-rw-r--r--ext/date/tests/bug55407.phpt17
2 files changed, 18 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index f8571b91b5..8a7aeae5ac 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 0000000000..00c3356461
--- /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--
+<?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