aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Extension.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-04-01 17:55:20 +0200
committerGravatar GitHub <noreply@github.com> 2025-04-01 17:55:20 +0200
commit3336631a846c2e34f55b2ecb76b46cd68228486f (patch)
treec2672609f84d57c1bf7c3c338a1369ff5748bff0 /lib/Minz/Extension.php
parentdbdadbb4107878d9233f635c31a88afe45957101 (diff)
Catch extension exceptions in override (#7475)
* Catch extension exceptions in override https://github.com/FreshRSS/Extensions/pull/300#issuecomment-2768578464 * Fix error message
Diffstat (limited to 'lib/Minz/Extension.php')
-rw-r--r--lib/Minz/Extension.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php
index 25cbe2091..d03db8bde 100644
--- a/lib/Minz/Extension.php
+++ b/lib/Minz/Extension.php
@@ -91,6 +91,10 @@ abstract class Minz_Extension {
$this->is_enabled = true;
}
+ final public function disable(): void {
+ $this->is_enabled = false;
+ }
+
/**
* Return if the extension is currently enabled.
*
@@ -253,6 +257,8 @@ abstract class Minz_Extension {
switch ($type) {
case 'system': return FreshRSS_Context::hasSystemConf();
case 'user': return FreshRSS_Context::hasUserConf();
+ default:
+ return false;
}
}