Auth/CAS: fix CLI mode
This commit is contained in:
parent
4a190f3f25
commit
62fbdbf1c2
1 changed files with 6 additions and 2 deletions
|
@ -22,8 +22,12 @@ class Cas extends Method {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function init() {
|
public static function init() {
|
||||||
// In phpstan context, do not initialize
|
// In CLI or Phpstan context, do not initialize
|
||||||
if (defined('__PHPSTAN_RUNNING__') && constant('__PHPSTAN_RUNNING__')) // @phpstan-ignore-line
|
if (
|
||||||
|
php_sapi_name() == "cli"
|
||||||
|
// @phpstan-ignore-next-line
|
||||||
|
|| (defined('__PHPSTAN_RUNNING__') && constant('__PHPSTAN_RUNNING__'))
|
||||||
|
)
|
||||||
return true;
|
return true;
|
||||||
// Set config default values
|
// Set config default values
|
||||||
App :: set_default(
|
App :: set_default(
|
||||||
|
|
Loading…
Reference in a new issue