diff --git a/setup/sdk/proxy-spid-php.tpl b/setup/sdk/proxy-spid-php.tpl index 6328439..e14a123 100644 --- a/setup/sdk/proxy-spid-php.tpl +++ b/setup/sdk/proxy-spid-php.tpl @@ -20,13 +20,13 @@ class PROXY_SPID_PHP extends SPID_PHP { public function addSPIDButtonListItems($method='GET'): string{ - $registry_idp_json = file_get_contents('https://registry.spid.gov.it/entities-idp?output=json'); + $registry_idp_json = @file_get_contents('https://registry.spid.gov.it/entities-idp?output=json'); $registry_idp = json_decode($registry_idp_json, true); if($registry_idp!=null && is_array($registry_idp) && count($registry_idp)) { - file_put_contents('spid-idps.json', $registry_idp_json); + file_put_contents(__DIR__ . '/spid-idps.json', $registry_idp_json); } else { - $registry_idp = json_decode(file_get_contents('spid-idps.json'), true); + $registry_idp = json_decode(file_get_contents(__DIR__ . '/spid-idps.json'), true); } $button_li = "";