Merge branch 'ent-7349-error-500-importar-recursos-resource-registration' into 'develop'
Fix reource registraton error 500 on empty or bad ptr file See merge request artica/pandorafms!4051
This commit is contained in:
commit
7b9c638f0d
|
@ -1096,9 +1096,14 @@ function resource_registration_extension_main()
|
||||||
}
|
}
|
||||||
|
|
||||||
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
|
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
|
||||||
|
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);
|
process_upload_xml($xml);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
extensions_add_godmode_menu_option(__('Resource registration'), 'PM', 'gagente', '', 'v1r1');
|
extensions_add_godmode_menu_option(__('Resource registration'), 'PM', 'gagente', '', 'v1r1');
|
||||||
|
|
Loading…
Reference in New Issue