Warning when adding an authentication plugin to an institution

Bug #1331863 reported by Son Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Son Nguyen

Bug Description

Version: master (1.10)
Platform: any
Browser: any

I got the warning when adding an authentication plugin to an institution

  [WAR] ae (lib/mahara.php:1845) Argument 1 passed to Plugin::validate_config_options() must be an instance of Pieform, array given
Call stack (most recent first):
log_message("Argument 1 passed to Plugin::validate_config_optio...", 8, true, true, "/home/sonn/code/mahara/master/htdocs/lib/mahara.ph...", 1845) at /home/sonn/code/mahara/master/htdocs/lib/errors.php:433
error(4096, "Argument 1 passed to Plugin::validate_config_optio...", "/home/sonn/code/mahara/master/htdocs/lib/mahara.ph...", 1845, array(size 0)) at /home/sonn/code/mahara/master/htdocs/lib/mahara.php:1845
Plugin::validate_config_options(array(size 7), object(Pieform)) at Unknown:0
call_user_func_array(array(size 2), array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/mahara.php:1584
call_static_method("PluginAuthBrowserid", "validate_config_options", array(size 7), object(Pieform)) at /home/sonn/code/mahara/master/htdocs/admin/users/addauthority.php:114
auth_config_validate(object(Pieform), array(size 7)) at Unknown:0
call_user_func_array("auth_config_validate", array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:1382
Pieform->validate(array(size 7)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:505
Pieform->__construct(array(size 5)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:162
Pieform::process(array(size 5)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 5)) at /home/sonn/code/mahara/master/htdocs/admin/users/addauthority.php:87

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3452

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/3453

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3453
Committed: http://gitorious.org/mahara/mahara/commit/e53a30c087143ae75985abc73430bf9a483d34d5
Submitter: Ghada El-Zoghbi (<email address hidden>)
Branch: master

commit e53a30c087143ae75985abc73430bf9a483d34d5
Author: Aaron Wells <email address hidden>
Date: Thu Jun 19 21:28:53 2014 +1200

Drop support for auth plugins using site-config functions for instance config

Bug 1331863: Now that we've add a default validate_config_options()
implementation to the base Plugin class, we get a warning when saving
the config for auth plugins that say yes to has_instance_config() but have
not implemented the (optional) function validate_instance_config_options.

This is because of backwards-compatibility code to deal with older
auth plugins that were using get_config_options(), validate_config_options(),
and save_config_options(), to handle instance config. We made this change
in Mahara 1.5 and added a warning message then, that says to update the
plugin. I think that's a long enough warning period to just go ahead and
drop support for it.

>From now on, plugins that have instance configs, will have to implement
get_instance_config_options(), validate_instance_config_options(), and
save_instance_config_options(). (All the core auth plugins already do.)

Change-Id: Ia135a96a6d8c36d36708a9b9a66eaef71bc788e9

Son Nguyen (ngson2000)
Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.