Commit 589c6318 authored by Lukas Haemmerle's avatar Lukas Haemmerle

Removed two PHP warnings due to uninitialized variables

parent dc2d3f78
...@@ -142,7 +142,7 @@ if (isset($options['min-idp-count'])) { ...@@ -142,7 +142,7 @@ if (isset($options['min-idp-count'])) {
} }
// Input validation // Input validation
if ($metadataURL) { if (isset($metadataURL) && $metadataURL) {
$metadataFile = tempnam(sys_get_temp_dir(), 'metadata'); $metadataFile = tempnam(sys_get_temp_dir(), 'metadata');
if (!ini_get('allow_url_fopen')) { if (!ini_get('allow_url_fopen')) {
reportError("Exiting: allow_url_fopen disabled, unabled to download $metadataURL\n"); reportError("Exiting: allow_url_fopen disabled, unabled to download $metadataURL\n");
...@@ -219,7 +219,7 @@ if (is_array($metadataSProviders)){ ...@@ -219,7 +219,7 @@ if (is_array($metadataSProviders)){
} }
// clean up if needed // clean up if needed
if ($metadataURL) { if (isset($metadataURL) && $metadataURL) {
$result = @unlink($metadataFile); $result = @unlink($metadataFile);
if (!$result) { if (!$result) {
$error = error_get_last(); $error = error_get_last();
......
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