Skip to content

Commit c7829fa

Browse files
authored
Throw Error on failing file_get_contents($plugin->getConf('openidurl')); (#6)
It took me quite a while to debug. Finally it was a proxy issue. But please to not silence errors and continue execution. Throw the errors. Thank you.
1 parent 28892ed commit c7829fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Keycloak.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getEndpoint(string $endpoint)
4141
if (!isset($this->discovery)) {
4242
$plugin = plugin_load('helper', 'oauthkeycloak');
4343
$json = file_get_contents($plugin->getConf('openidurl'));
44-
if (!$json) return '';
44+
if (!$json) throw new \Exception('Failed accessing ' . $plugin->getConf('openidurl'));
4545
$this->discovery = json_decode($json, true);
4646
}
4747
if (!isset($this->discovery[$endpoint])) return '';

0 commit comments

Comments
 (0)