WillyJimmyDev / simple-quiz

A simple quiz administration written in PHP with a MySQL backend. Uses Bootstrap 3 and Slim PHP micro framework
http://elanman.com/simple-quiz/
Apache License 2.0
164 stars 73 forks source link

Fix session warning in PHP 7.1 #33

Closed Sorck closed 6 years ago

Sorck commented 6 years ago

ElanMan/simple-quiz#31

This patch fixes the warning on line 22 of Session.php under PHP 7.1 (tested in 7.1.11 under AMI Linux). Note that I did not experience the session_regenerate_id() issue in the referenced issue.

NB: SessionHandlerInterface requires the read method return a string for all values, else a PHP warning is issued. This commit allows the function to return an empty string, whereas it was previously not returning a value.

WillyJimmyDev commented 6 years ago

Thanks very much @Sorck