From aecadd76dfcd5a6e98b3490cc14399eabf1d0e7b Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 9 Dec 2015 10:13:36 -0500 Subject: [PATCH] Fix warning about course password form element: Illegal string offset 'class' in main/inc/lib/pear/HTML/QuickForm/password.php on line 53 --- main/auth/set_temp_password.php | 2 +- main/inc/lib/pear/HTML/QuickForm/password.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/main/auth/set_temp_password.php b/main/auth/set_temp_password.php index 9f9d5b003d..f1ea602542 100755 --- a/main/auth/set_temp_password.php +++ b/main/auth/set_temp_password.php @@ -33,7 +33,7 @@ $form = new FormValidator('set_temp_password', 'POST', api_get_self().'?course_i $form->addElement('header', get_lang('CourseRequiresPassword')); $form->addElement('hidden', 'course_id', $course_id); $form->addElement('hidden', 'session_id', $session_id); -$form->addElement('password', 'course_password', null, get_lang('Password')); +$form->addElement('password', 'course_password', get_lang('Password')); $form->addButtonSave(get_lang('Accept')); if ($form->validate()) { diff --git a/main/inc/lib/pear/HTML/QuickForm/password.php b/main/inc/lib/pear/HTML/QuickForm/password.php index 15b1c07b46..2d7c3ee303 100755 --- a/main/inc/lib/pear/HTML/QuickForm/password.php +++ b/main/inc/lib/pear/HTML/QuickForm/password.php @@ -38,14 +38,12 @@ class HTML_QuickForm_password extends HTML_QuickForm_text /** * Class constructor - * * @param string $elementName (optional)Input field name attribute * @param string $elementLabel (optional)Input field label * @param mixed $attributes (optional)Either a typical HTML attribute string * or an associative array * @since 1.0 * @access public - * @return void * @throws */ public function __construct($elementName=null, $elementLabel=null, $attributes=null)