From e6f05a2731c61d931be49e121c068e49c0ad5e01 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 6 Apr 2025 16:41:28 +0200 Subject: [PATCH] Plugin name is required, version is optional --- system/src/Plugins.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/system/src/Plugins.php b/system/src/Plugins.php index 605d3e2a..c1d9b360 100644 --- a/system/src/Plugins.php +++ b/system/src/Plugins.php @@ -411,20 +411,13 @@ class Plugins { $continue = true; if(!isset($plugin_json['name']) || empty(trim($plugin_json['name']))) { - self::$warnings[] = 'Plugin "name" tag is not set.'; - } - if(!isset($plugin_json['description']) || empty(trim($plugin_json['description']))) { - self::$warnings[] = 'Plugin "description" tag is not set.'; + self::$error = 'Plugin "name" tag is not set.'; + return false; } + if(!isset($plugin_json['version']) || empty(trim($plugin_json['version']))) { self::$warnings[] = 'Plugin "version" tag is not set.'; } - if(!isset($plugin_json['author']) || empty(trim($plugin_json['author']))) { - self::$warnings[] = 'Plugin "author" tag is not set.'; - } - if(!isset($plugin_json['contact']) || empty(trim($plugin_json['contact']))) { - self::$warnings[] = 'Plugin "contact" tag is not set.'; - } if(isset($plugin_json['require'])) { $require = $plugin_json['require'];