Commit 9cfe3bb9 authored by Lisa Seeto's avatar Lisa Seeto
Browse files

Bug 1826974: Deleting a non-instiutional tag from file produces a warning

remove_prefix from newtag only if it's not empty


Change-Id: I7605e1bdf05b8f2238d2fba2e95b1f9919e899a0
Signed-off-by: default avatarLisa Seeto <>
parent bfec8984
......@@ -1280,7 +1280,9 @@ function pieform_element_filebrowser_update(Pieform $form, $element, $data) {
$updatetags = $oldtags != $newtags;
if ($updatetags) {
require_once(get_config('docroot') . 'lib/form/elements/tags.php');
$newtags = array_map('remove_prefix', $newtags);
if (!empty($newtags)) {
$newtags = array_map('remove_prefix', $newtags);
$artefact->set('tags', $newtags);
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