xref: /PHP-7.1/ext/date/tests/bug75002.phpt (revision 7af945e2)
1--TEST--
2Bug #75002 Null Pointer Dereference in timelib_time_clone
3--FILE--
4<?php
5
6class aaa extends DatePeriod {
7	public function __construct() { }
8}
9
10$start=new DateTime( '2012-08-01' );
11
12foreach (new aaa($start) as $y) {
13	$a=$key;
14}
15
16?>
17==DONE==
18--EXPECTF--
19Fatal error: Uncaught Error: DatePeriod has not been initialized correctly in %sbug75002.php:%d
20Stack trace:
21#0 {main}
22  thrown in %sbug75002.php on line %d
23