bug69111.phpt 529 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #69111 Crash in SessionHandler::read()
  3. --XFAIL--
  4. It is still a leak
  5. --SKIPIF--
  6. <?php include('skipif.inc'); ?>
  7. --FILE--
  8. <?php
  9. $sh = new SessionHandler;
  10. session_set_save_handler($sh);
  11. $savePath = ini_get('session.save_path');
  12. $sessionName = ini_get('session.name');
  13. // session_start(); // Uncommenting this makes it not crash when reading the session (see below), but it will not return any data.
  14. $sh->open($savePath, $sessionName);
  15. $sh->write("foo", "bar");
  16. var_dump($sh->read(@$id));
  17. ?>
  18. --EXPECTF--
  19. bool(false)