bug75002.phpt 424 B

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