From b57242108d3f09238889c6e66531b55599eedf87 Mon Sep 17 00:00:00 2001 From: Clemente Raposo Date: Tue, 14 Jan 2025 12:06:14 +0000 Subject: [PATCH] [Legacy] Replace die with exception --- public/legacy/ModuleInstall/PackageManager/PackageManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/legacy/ModuleInstall/PackageManager/PackageManager.php b/public/legacy/ModuleInstall/PackageManager/PackageManager.php index 21db6ac29..f22047b48 100755 --- a/public/legacy/ModuleInstall/PackageManager/PackageManager.php +++ b/public/legacy/ModuleInstall/PackageManager/PackageManager.php @@ -542,14 +542,14 @@ class PackageManager if ($upgrade_zip_type != "module" && $upgrade_zip_type != "theme" && $upgrade_zip_type != "langpack") { $this->unlinkTempFiles(); if ($display_messages) { - die($mod_strings['ERR_UW_NOT_ACCEPTIBLE_TYPE']); + throw new RuntimeException($mod_strings['ERR_UW_NOT_ACCEPTIBLE_TYPE']); } } } elseif ($view == "default") { if ($upgrade_zip_type != "patch") { $this->unlinkTempFiles(); if ($display_messages) { - die($mod_strings['ERR_UW_ONLY_PATCHES']); + throw new RuntimeException($mod_strings['ERR_UW_ONLY_PATCHES']); } } }