[php-src] Issue #7787: session_save_handler incomplete stack trace
| From: | mokraemer | Date: | Sat, 18 Dec 2021 12:55:41 +0000 |
| Subject: | [php-src] Issue #7787: session_save_handler incomplete stack trace | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238471@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7787
Author: mokraemer
### Description
The following code:
```php
<?php
class MySessionHandler implements SessionHandlerInterface,SessionUpdateTimestampHandlerInterface{
public function write($sessID, $sessData, $lock = false): bool{
if(...){
return false;
}
if(...){
return false;
}
return true;
}
public function updateTimestamp($sessID, $val){
return false;
}
}
$handler = new MySessionHandler();
session_set_save_handler($handler, true);
session_start();
```
Resulted in this output:
```
session_write_close(): Failed to write session data using user defined save handler.
(session.save_path: /var/lib/php)
```
But I expected this output instead:
Having this "fake" session handler, it is impossible to say where session write failed and
find the cause. An installed error handler just reports
errorHandler::errorHandler called at [:]
### PHP Version
php 8.0.14
### Operating System
Mageia 8