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

Broken Memcached using JSON serialiser

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.5.1
    • Fix Version/s: BACKEND
    • Component/s: Caching
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE

      Description

      I was trying to set up Memcached on my machine, and for some reason I used the JSON serialiser. Unfortunately, this is broken. It seems that any array that is passed to the cache is then retrieved as an stdClass. Which causes Fatal errors everywhere.

      I kept all the default settings for Memcached, apart from the serialiser obviously. And I used this store as the default for Application cache.

      Fatal error: Cannot use object of type stdClass as array in /home/fred/www/repositories/sm/moodle/lib/pluginlib.php on line 3346
       
      Call Stack:
          0.0010     848648   1. {main}() /home/fred/www/repositories/sm/moodle/cache/admin.php:0
          0.1875   45832896   2. admin_externalpage_setup() /home/fred/www/repositories/sm/moodle/cache/admin.php:44
          0.1917   45849280   3. admin_get_root() /home/fred/www/repositories/sm/moodle/lib/adminlib.php:6280
          0.3617   57612296   4. require('/home/fred/www/repositories/sm/moodle/admin/settings/plugins.php') /home/fred/www/repositories/sm/moodle/lib/adminlib.php:6393
          0.3656   59491960   5. plugin_manager->get_plugins() /home/fred/www/repositories/sm/moodle/admin/settings/plugins.php:9
          0.3667   59889584   6. call_user_func() /home/fred/www/repositories/sm/moodle/lib/pluginlib.php:167
          0.3667   59889656   7. plugininfo_mod::get_plugins() /home/fred/www/repositories/sm/moodle/lib/pluginlib.php:0
          0.3667   59889656   8. plugininfo_base::get_plugins() /home/fred/www/repositories/sm/moodle/lib/pluginlib.php:3286
          0.3774   60174256   9. plugininfo_default_factory::make() /home/fred/www/repositories/sm/moodle/lib/pluginlib.php:2467
          0.3786   60188240  10. plugininfo_base->load_required_main_version() /home/fred/www/repositories/sm/moodle/lib/pluginlib.php:2410
          0.3786   60188240  11. plugininfo_mod->load_version_php() /home/fred/www/repositories/sm/moodle/lib/pluginlib.php:2562
      

      I assume that this happens on 2.4 as well

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              fred Frédéric Massart
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: