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

Closures within the course renderer cause fatal errors when using eAccelerator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.6, 2.4.3, 2.5
    • Fix Version/s: 2.3.7, 2.4.4
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable eAccelerator.
      2. Log in as an admin.
      3. Browse to a course and turn on editing.
      4. Test that the activity chooser displays without errors.
      5. Under 2.5 (master), with multiple courses and cats, try all the frontpage combinations (list of courses, cats, combo...) logged and not logged. Navigating along cats...
      Show
      Enable eAccelerator. Log in as an admin. Browse to a course and turn on editing. Test that the activity chooser displays without errors. Under 2.5 (master), with multiple courses and cats, try all the frontpage combinations (list of courses, cats, combo...) logged and not logged. Navigating along cats...
    • Workaround:
      Hide

      Disable eAccelerator.

      Show
      Disable eAccelerator.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-39432-m25

      Description

      To reproduce:

      1. Enable eAccelerator.
      2. Log in as an admin.
      3. Browse to a course and turn on editing.

      Fatal error: Invalid opcode 153/1/8. in /var/www/integration/course/renderer.php on line 203
      Call Stack

      1. Time Memory Function Location
        1 0.0009 760928
        Unknown macro: {main}

        ( ) ../view.php:0
        2 1.4550 76235776 require( '/var/www/integration/course/format/topics/format.php' ) ../view.php:276
        3 1.4568 76241192 format_section_renderer_base->print_multiple_section_page( ) ../format.php:56
        4 1.4705 76246064 core_course_renderer->course_section_add_cm_control( ) ../renderer.php:724
        5 1.5501 83682312 core_course_renderer->course_modchooser( ) ../renderer.php:456

      There are a couple of closure style anonymous functions within course/renderer.php.
      This issue was noticed with the use of closures within the lti module as per MDL-36060.
      Dan has created MDL-39430 to decide the future for us supporting for eAccelerator however for the time being it is probably worth just quickly converting these to lambda style anonymous functions.

      Many thanks
      Sam

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/May/13