PHP函数set_exception_handler用来设置用户自定义的异常处理函数,
此函数的参数在PHP5和PHP7之间存在一些差异,
PHP7对传入 exception_handler 的参数从 Exception 改为 Throwable
<?php
// PHP 5 写法
function handler(Exception $e) { ... }
set_exception_handler('handler');
// 兼容 PHP 5 and 7
function handler($e) { ... }
// PHP 7 写法
function handler(Throwable $e) { ... }
?>
这个错误存在于Codeigniter 3.06以前的版本。
参考资料: