Skip to content

Commit 2038dc8

Browse files
authored
avoid error when plugin is deactivated (#518)
avoid error when plugin is deactivated
1 parent 086e725 commit 2038dc8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

boot.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
* @psalm-scope-this rex_addon
66
*/
77

8-
rex_ycom_auth::addInjection(new rex_ycom_injection_otp(), 1);
9-
rex_ycom_auth::addInjection(new rex_ycom_injection_passwordchange(), 4);
10-
rex_ycom_auth::addInjection(new rex_ycom_injection_termsofuse(), 8);
8+
if (rex_plugin::get('ycom', 'auth')->isAvailable()) {
9+
rex_ycom_auth::addInjection(new rex_ycom_injection_otp(), 1);
10+
rex_ycom_auth::addInjection(new rex_ycom_injection_passwordchange(), 4);
11+
rex_ycom_auth::addInjection(new rex_ycom_injection_termsofuse(), 8);
12+
}
1113

1214
if (rex::isBackend()) {
1315
rex_extension::register('PACKAGES_INCLUDED', static function ($params) {

0 commit comments

Comments
 (0)