aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/library_file.php
diff options
context:
space:
mode:
authorRasmus Fuhse <fuhse@data-quest.de>2024-07-03 10:05:17 +0000
committerRasmus Fuhse <fuhse@data-quest.de>2024-07-03 10:05:17 +0000
commit9f9d4e7f61ee78f9296f3a6b4e3093b4ec40cc94 (patch)
treea339d81664321fb80fe10a6d475ec9a849212b07 /app/controllers/library_file.php
parent83358ee8215d40dec58c56d54a2a909fc23b9dc4 (diff)
Resolve "Dateibereich: Literaturangaben haben ungeklärte Lizenz"
Closes #4361 Merge request studip/studip!3162
Diffstat (limited to 'app/controllers/library_file.php')
-rw-r--r--app/controllers/library_file.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/library_file.php b/app/controllers/library_file.php
index 6331a1e..abfbf66 100644
--- a/app/controllers/library_file.php
+++ b/app/controllers/library_file.php
@@ -101,11 +101,11 @@ class LibraryFileController extends AuthenticatedController
$this->required_properties = [];
$this->enriched_properties = [];
foreach ($this->defined_variables as $key => $variable) {
- if ($variable['required']) {
+ if (!empty($variable['required'])) {
$this->required_properties[] = $variable['name'];
$key += 100;
}
- if (in_array($variable['name'], $this->document_type['properties'])) {
+ if (isset($variable['name']) && in_array($variable['name'], $this->document_type['properties'])) {
$this->enriched_properties[$key] = $variable;
$property_types[$variable['name']] = $variable['type'];
}
@@ -241,11 +241,11 @@ class LibraryFileController extends AuthenticatedController
$this->required_properties = [];
$this->enriched_properties = [];
foreach ($this->defined_variables as $key => $variable) {
- if ($variable['required']) {
+ if (!empty($variable['required'])) {
$this->required_properties[] = $variable['name'];
$key += 100;
}
- if (in_array($variable['name'], $this->document_type['properties'])) {
+ if (isset($variable['name']) && in_array($variable['name'], $this->document_type['properties'])) {
$this->enriched_properties[$key] = $variable;
$property_types[$variable['name']] = $variable['type'];
}