Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59678

Fix incorrect access to associative array

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.1
    • Fix Version/s: None
    • Component/s: Competencies
    • Labels:
    • Affected Branches:
      MOODLE_33_STABLE

      Description

      diff --git a/competency/classes/external.php b/competency/classes/external.php
      index 1024e57..0c35f41 100644
      --- a/competency/classes/external.php
      +++ b/competency/classes/external.php
      @@ -841,10 +841,10 @@ class external extends external_api {
               $validcolumns = array('id', 'shortname', 'description', 'sortorder', 'idnumber',
                   'parentid', 'competencyframeworkid');
               foreach ($params['filters'] as $filter) {
      -            if (!in_array($filter->column, $validcolumns)) {
      +            if (!in_array($filter['column'], $validcolumns)) {
                       throw new invalid_parameter_exception('Filter column was invalid');
                   }
      -            $safefilters[$filter->column] = $filter->value;
      +            $safefilters[$filter['column']] = $filter['value'];
               }
       
               $context = null;
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aggeorgiev aggeorgiev
              Participants:
              Component watchers:
              Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: