Commit 1d8594e2 authored by Yuliya Bozhko's avatar Yuliya Bozhko
Browse files

Fix for errors when no license exists (Bug #1297075)

Errors occur when "License metadata" is enabled and all licenses are removed sitewide

Change-Id: Ifb866e0d33c512885ae889862d5a97223ec5ed37
Signed-off-by: default avatarYuliya Bozhko <>
parent 95970220
......@@ -29,8 +29,10 @@ function license_form_el_basic($artefact, $always_allow_none=false) {
global $USER;
$licenses = get_records_assoc('artefact_license', null, null, 'displayname');
foreach ($licenses as $l) {
$options[$l->name] = $l->displayname;
if ($licenses) {
foreach ($licenses as $l) {
$options[$l->name] = $l->displayname;
// Determine whether to include the "none selected" option in the list of licenses
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