Skip to content

Commit dd991db

Browse files
committed
no php notice if string plugindescription is missing
1 parent ee1f571 commit dd991db

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

settings.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,14 @@
8181
$triggername,
8282
get_string('customfieldsemesterdescription', 'tool_lifecycle')));
8383
} else {
84+
try {
85+
$plugindescription = get_string('plugindescription', 'lifecycletrigger_' . $trigger);
86+
} catch (Exception $e) {
87+
$plugindescription = "";
88+
}
8489
$settings->add(new admin_setting_description('lifecycletriggersetting_'.$trigger,
8590
$triggername,
86-
get_string('plugindescription', 'lifecycletrigger_' . $trigger).$uninstall));
91+
$plugindescription.$uninstall));
8792
}
8893
}
8994
} else {
@@ -98,9 +103,14 @@
98103
foreach ($steps as $step => $path) {
99104
$stepname = html_writer::span(get_string('pluginname', 'lifecyclestep_' . $step),
100105
"font-weight-bold");
106+
try {
107+
$plugindescription = get_string('plugindescription', 'lifecyclestep_' . $step);
108+
} catch (Exception $e) {
109+
$plugindescription = "";
110+
}
101111
$settings->add(new admin_setting_description('lifecyclestepsetting_'.$step,
102112
$stepname,
103-
get_string('plugindescription', 'lifecyclestep_' . $step)));
113+
$plugindescription));
104114
}
105115
} else {
106116
$settings->add(new admin_setting_heading('adminsettings_nosteps',

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
defined('MOODLE_INTERNAL') || die;
2626

2727
$plugin->maturity = MATURITY_STABLE;
28-
$plugin->version = 2025050402;
28+
$plugin->version = 2025050403;
2929
$plugin->component = 'tool_lifecycle';
3030
$plugin->requires = 2022112800; // Requires Moodle 4.1+.
3131
$plugin->supported = [401, 405];
32-
$plugin->release = 'v4.5-r3';
32+
$plugin->release = 'v4.5-r4';

0 commit comments

Comments
 (0)