1--TEST-- 2Bug #80889 (Cannot set save handler when save_handler is invalid) 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--INI-- 6session.save_handler=whatever 7--FILE-- 8<?php 9class DummyHandler implements SessionHandlerInterface { 10 public function open($savePath, $sessionName) { 11 return true; 12 } 13 public function close() { 14 return true; 15 } 16 public function read($id) { 17 return ''; 18 } 19 public function write($id, $data) { 20 return true; 21 } 22 public function destroy($id) { 23 return true; 24 } 25 public function gc($maxlifetime) { 26 return true; 27 } 28} 29 30$initHandler = ini_get('session.save_handler'); 31session_set_save_handler(new DummyHandler()); 32$setHandler = ini_get('session.save_handler'); 33var_dump($initHandler, $setHandler); 34?> 35--EXPECT-- 36string(8) "whatever" 37string(4) "user" 38