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

Faulty calls to lock and unlock functions

XMLWordPrintable

    • MOODLE_404_STABLE

      In cache/locks/file/lib.php (cachelock_file class), it seems to me there are some discrepancies.
      According to their signature, the second formal parameter of the lock and unlock functions  is $ownerid.

      125 public function lock($key, $ownerid, $block = false) { 
      [...]
      183 public function unlock($key, $ownerid, $forceunlock = false) {
      [...] 

      But in the calls to these two functions don't pass the $ownerid as effectif parameter. They pass a boolean (maybe intended to set $block value?).

      141 $this->unlock($key, true); 
      142 $result = $this->lock($key, false); 

      This affects all versions since 2.4.11 (Build: 20140714).

            Unassigned Unassigned
            agrothendieck Alexander Grothendieck
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.