mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 10:34:34 +00:00
Avoid errors by explicitely namespacing root exception
This commit is contained in:
@@ -192,7 +192,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
}
|
||||
|
||||
return ($application->get_client_secret() === $client_secret);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
, 'oauth_token' => $token->get_value()
|
||||
);
|
||||
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
, 'expires' => $code->get_expires()
|
||||
, 'account_id' => $code->get_account()->get_id()
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
, 'expires' => $token->get_expires()->format('U')
|
||||
, 'client_id' => $token->get_account()->get_application()->get_client_id()
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
try {
|
||||
$user = User_Adapter::getInstance($usr_id, $this->app);
|
||||
$account = API_OAuth2_Account::load_with_user($this->app, $this->client, $user);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$account = $this->createAccount($usr_id);
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
$token->set_session_id($ses_id);
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user