fix PHP 8.0 Fatal error: Declaration of Api\Etemplate\Request\Session::read($id = null) must be compatible with Api\Etemplate\Request::read($id = null, $handle_not_found = true)

This commit is contained in:
Ralf Becker 2021-10-07 18:39:40 +02:00
parent 74433a6a32
commit ca00987fb2
2 changed files with 6 additions and 4 deletions

View File

@ -97,9 +97,10 @@ class Files extends Etemplate\Request
* Factory method to get a new request object or the one for an existing request
*
* @param string $id =null
* @return ?Etemplate\Request|false the object or false if $id is not found
* @param bool $handle_not_found =true true: handle not found by trying to redirect, false: just return null
* @return Request|null null if Request not found and $handle_not_found === false
*/
static function read($id=null)
public static function read($id=null, $handle_not_found=true)
{
$request = new Files($id);

View File

@ -83,9 +83,10 @@ class Session extends Etemplate\Request
* Factory method to get a new request object or the one for an existing request
*
* @param string $id =null
* @return ?Etemplate\request|false the object or false if $id is not found
* @param bool $handle_not_found =true true: handle not found by trying to redirect, false: just return null
* @return Request|null null if Request not found and $handle_not_found === false
*/
static function read($id=null)
public static function read($id=null, $handle_not_found=true)
{
$request = new Session($id);