mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-16134 - fixing regression introduced by conversion to exceptions
This commit is contained in:
parent
f240dc7036
commit
23cbde0a14
1 changed files with 3 additions and 2 deletions
|
@ -1379,9 +1379,10 @@ abstract class portfolio_plugin_base {
|
||||||
global $DB;
|
global $DB;
|
||||||
foreach ($config as $key => $value) {
|
foreach ($config as $key => $value) {
|
||||||
// try set it in $this first
|
// try set it in $this first
|
||||||
if ($this->set($key, $value)) {
|
try {
|
||||||
|
$this->set($key, $value);
|
||||||
continue;
|
continue;
|
||||||
}
|
} catch (portfolio_exception $e) { }
|
||||||
if (!in_array($key, $this->get_allowed_config())) {
|
if (!in_array($key, $this->get_allowed_config())) {
|
||||||
$a = (object)array('property' => $key, 'class' => get_class($this));
|
$a = (object)array('property' => $key, 'class' => get_class($this));
|
||||||
throw new portfolio_export_exception($this->get('exporter'), 'invalidconfigproperty', 'portfolio', null, $a);
|
throw new portfolio_export_exception($this->get('exporter'), 'invalidconfigproperty', 'portfolio', null, $a);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue