From 06a235237def85ee9dda6fa78bd6ab006a1401c8 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 22 Apr 2025 14:05:10 +0200 Subject: [PATCH] Plugin name is required, version is optional --- system/libs/plugins.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/system/libs/plugins.php b/system/libs/plugins.php index 15e6ccdc..1012e822 100644 --- a/system/libs/plugins.php +++ b/system/libs/plugins.php @@ -144,20 +144,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'];