Commit 7373168d authored by haemmer's avatar haemmer

$_SERVER['SERVER_NAME'] is now set with dummy value when readMetadata.php is run in CLI

Changed code to prevent output to STDOUT when SPs are parsed
parent 28e4071e
......@@ -16,6 +16,11 @@ if(isRunViaCLI()){
// Run in cli mode.
// Could be used for testing purposes or to facilitate startup confiduration.
// Results are dumped in $metadataIDPFile (see config.php)
// Set dummy server name
$_SERVER['SERVER_NAME'] = 'localhost';
// Load configuration files
require('config.php');
require($IDPConfigFile);
......@@ -166,10 +171,10 @@ function parseMetadata($metadataFile, $defaultLanguage){
$SP = processSPRoleDescriptor($RoleDescriptor);
if ($SP){
$metadataSProviders[$entityID] = $SP;
echo "SP added: $entityID\n";
} else {
echo "Failed to load SP with entityID $entityID from metadata file $metadataFile";
}
} else {
$errorMsg = "Failed to load SP with entityID $entityID from metadata file $metadataFile";
syslog(LOG_ERR, $errorMsg);
}
break;
default:
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment