diff --git a/api/src/Etemplate/Request/Files.php b/api/src/Etemplate/Request/Files.php index b15054d320..613bd5be30 100644 --- a/api/src/Etemplate/Request/Files.php +++ b/api/src/Etemplate/Request/Files.php @@ -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); diff --git a/api/src/Etemplate/Request/Session.php b/api/src/Etemplate/Request/Session.php index 7bad1420fe..339c09307d 100644 --- a/api/src/Etemplate/Request/Session.php +++ b/api/src/Etemplate/Request/Session.php @@ -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);