mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 18:19:47 +05:30
Set a default parameter for getParam
This commit is contained in:
parent
7d0c075b36
commit
542ca52d49
@ -408,10 +408,10 @@ class AuthServer
|
||||
* @param array $inputParams Passed input parameters
|
||||
* @return mixed 'Null' if parameter is missing
|
||||
*/
|
||||
public function getParam($param = '', $method = 'get', $inputParams = array())
|
||||
public function getParam($param = '', $method = 'get', $inputParams = array(), $default = null)
|
||||
{
|
||||
if (is_string($param)) {
|
||||
return (isset($inputParams[$param])) ? $inputParams[$param] : self::getRequest()->{$method}($param);
|
||||
return (isset($inputParams[$param])) ? $inputParams[$param] : $this->getRequest()->{$method}($param, $default);
|
||||
} else {
|
||||
$response = array();
|
||||
foreach ($param as $p) {
|
||||
|
Loading…
Reference in New Issue
Block a user