diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index 2f904dbf9f..950f4e2b81 100755 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -1096,8 +1096,13 @@ function resource_registration_extension_main() } $xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA); - - process_upload_xml($xml); + if ($xml === false) { + ui_print_error_message( + __('Error uploading resource. Check if the selected file is a valid resource template in .ptr format') + ); + } else { + process_upload_xml($xml); + } }