Open marxjohnson opened 1 year ago
@brendanheywood - will leave this to you or someone else in AU to review but... I'd be more inclined to fix it where the expirationtime var is used eg something like:
$this->expirationtime = !isset($config->expirationtime) ? 0 : $config->expirationtime;
I think where it's actually used is already taken care of in manager::get_objectfs_config()
. This is just an issue on the plugin settings page. #531 should resolve it.
any chance of adding in the actual php warning errors that appear here in the github issue? - will also help with others doing a google search for an error.
Done!
thanks Mark - this isn't something I'd merge in myself - using set_config() in the place you've added it just seems wrong - I wonder if there's a bug in the admin_setting_configduration class if it's not coping when the var isn't set, otherwise it might be somewhere else that needs fixing.
but - @brendanheywood may think otherwise and just merge it.... :-)
The following warnings are displayed on the plugin settings page:
Steps to reproduce:
\tool_objectfs\s3_file_system
and click "Save changes"This is because unless you select a file system during installation, the expiration time field is never displayed, and so no value is saved for the setting. The
admin_setting_configduration
class assumes the setting was saved during installation, and so doesn't cope well when it is empty.