summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug55397.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/tests/bug55397.phpt')
-rw-r--r--ext/date/tests/bug55397.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/date/tests/bug55397.phpt b/ext/date/tests/bug55397.phpt
new file mode 100644
index 000000000..efc09b504
--- /dev/null
+++ b/ext/date/tests/bug55397.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #55397 (comparsion of incomplete DateTime causes SIGSEGV)
+--INI--
+--FILE--
+<?php
+date_default_timezone_set('Europe/Prague');
+var_dump(unserialize('O:8:"DateTime":0:{}') == new DateTime);
+?>
+--EXPECTF--
+Warning: %s: Trying to compare an incomplete DateTime object in %s on line %d
+bool(false)