Enrolment error after 3.0 upgrade

Enrolment error after 3.0 upgrade

by Admin Hesston College -
Number of replies: 2

I can't find any references to this anywhere so I'm hoping someone here can try to explain ro give a hint of what's failing.

I upgraded from 2.6 to 3.0, and then I get the following error when I access enrolment method in a course (dev. debug turned on):

Enrolment methods

Exception - [] operator not supported for strings

More information about this error

Debug info: 
Error code: generalexceptionmessage
Stack trace:
  • line 234 of /enrol/instances.php: Error thrown
That line of code (last one of this block for reference) says:

    if ($canconfig) {

        // up/down link

        $updown = '';

        if ($updowncount > 1) {

            $aurl = new moodle_url($url, array('action'=>'up', 'instance'=>$instance->id));

            $updown[] = $OUTPUT->action_icon($aurl, new pix_icon('t/up', $strup, 'core', array('class' => 'iconsmall')));

        } else {

            $updown[] = html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('spacer'), 'alt'=>'', 'class'=>'iconsmall'));


I do have one third party enrolment plugin installed (with their latest code that's 3.0 compatible). Disabling their plugin doesn't make any difference. I haven't uninstalled it because there's a lot of enrolment/student history tied to it.

So, anyone know what could be coming in on one of those variables that'd be bombing that line? Any clues are appreciated.

Average of ratings: -
In reply to Admin Hesston College

Re: Enrolment error after 3.0 upgrade

by Admin Hesston College -

Update:

They declare $updown as an array on line 224 and then reset its type to string by setting $updown equal to an empty string on line 229 and then on 232, 234, 238 and 240, they are using $updown again as an array. I commented 229 and the error cleared. (PHP7 is picky about such things...)

So, I assume I should submit this to tracker?