Skip to content

Commit 0074905

Browse files
authored
Merge pull request #3421 from jeedom/fix/forceDisablePlugin-config-pollution
Avoid config pollution when a plugin lookup fails on a non-existent id
2 parents b503b55 + 84e8ad4 commit 0074905

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/class/plugin.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ public static function byId($_id, $_full = false) {
179179
}
180180

181181
public static function forceDisablePlugin($_id) {
182-
config::save('active', 0, $_id);
182+
if (config::byKey('active', $_id, 0) == 1) {
183+
config::save('active', 0, $_id);
184+
}
183185
$values = array(
184186
'eqType_name' => $_id,
185187
);

0 commit comments

Comments
 (0)