bug62852.phpt 570 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #62852 (Unserialize invalid DateTime causes crash), variation 1
  3. --INI--
  4. date.timezone=GMT
  5. --FILE--
  6. <?php
  7. $s1 = 'O:8:"DateTime":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}';
  8. try {
  9. unserialize( $s1 );
  10. } catch ( Exception $e ) {}
  11. ?>
  12. --EXPECTF--
  13. Fatal error: Uncaught Error: Invalid serialization data for DateTime object in %sbug62852.php:%d
  14. Stack trace:
  15. #0 [internal function]: DateTime->__wakeup()
  16. #1 %sbug62852.php(%d): unserialize('O:8:"DateTime":...')
  17. #2 {main}
  18. thrown in %sbug62852.php on line %d