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

Error on cron run in cache/classes/helper.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.3.2, 3.3.3, 3.4, 3.4.1, 3.4.2, 3.4.9, 3.5.1, 3.5.6, 3.5.7, 3.5.8, 3.6.4, 3.6.5, 3.6.6, 3.7, 3.7.1, 3.7.2, 3.9.10, 3.10.7, 3.11.3, 4.0.2, 4.1.1, 4.2.1, 4.4
    • Caching

      It can happen that the array $store is empty (using redis)

      Add (array) to the foreach will solve this problem:

      foreach ((array) $store->get_many($keys) as $key => $value) {

       

      Original Message i get per mail from cron job:

      PHP Warning:  Invalid argument supplied for foreach() in
      /var/www/moodle/cache/classes/helper.php on
      line 707
      PHP Warning:  Invalid argument supplied for foreach() in
      /var/www/moodle/cache/classes/helper.php on
      line 707
      PHP Warning:  Invalid argument supplied for foreach() in
      /var/www/moodle/cache/classes/helper.php on
      line 707
      PHP Warning:  Invalid argument supplied for foreach() in
      /var/www/moodle/cache/classes/helper.php on
      line 707
      PHP Warning:  Invalid argument supplied for foreach() in
      /var/www/moodle/cache/classes/helper.php on
      line 707
      PHP Warning:  Invalid argument supplied for foreach() in
      /var/www/moodle/cache/classes/helper.php on
      line 707

            Votes:
            14 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

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