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

rcache caching empty records

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.8.4, 1.9, 2.0
    • Component/s: Performance
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      I was seeing some warnings about recent clone changes:
      Warning: __clone method called on non-object in /var/www/moodle/lib/dmllib.php on line 2586

      And realised it was to do with empty stuff being sent to rcache_set().

      I thought I was going crazy because:
      $foo = get_record('course', 'id', '99999999999');

      trigered the warning but this didn't:
      $foo = get_record('course', 'shortname', '99999999999');

      Then I realised $docache is only set when id is the first record.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/08