MDL-33875 delete category: fix E_STRICT reset() by ref.

This commit is contained in:
Eloy Lafuente (stronk7)
2012-06-20 03:31:44 +02:00
parent f4a9bf65da
commit 4388b63177
+3 -1
View File
@@ -102,8 +102,10 @@ class delete_category_form extends moodleform {
/// Give the options for what to do.
$mform->addElement('select', 'fulldelete', get_string('whattodo'), $options);
if (count($options) == 1) {
$optionkeys = array_keys($options);
$option = reset($optionkeys);
$mform->hardFreeze('fulldelete');
$mform->setConstant('fulldelete', reset(array_keys($options)));
$mform->setConstant('fulldelete', $option);
}
if ($displaylist) {