To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 68888e7b authored by vermeul's avatar vermeul
Browse files

show error when category is not found

parent 676fdbbd
...@@ -94,6 +94,10 @@ class YATA { ...@@ -94,6 +94,10 @@ class YATA {
# get the category entry from DB # get the category entry from DB
$cats = self::get_categories($dbr, $category); $cats = self::get_categories($dbr, $category);
if (! $cats[0]) {
array_push($errors, "no such category found: $category");
continue;
}
foreach($cats as $cat) { foreach($cats as $cat) {
$in_categories[] = $cat->name; $in_categories[] = $cat->name;
$cat_ids[] = $cat->id; $cat_ids[] = $cat->id;
......
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