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

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5.1
    • 2.5
    • Course
    • None
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • wip-MDL-39870-master
    • Hide
      1. Hack any module lib.php and make sure that modulename_supports() return something non-standard, like array or string or big integer
      2. Make sure you are able to add this module to the course (it appears in the "add activity or resource" window)
      3. After the module is added go to course view page, switch to editing mode and make sure that no warnings are displayed
      Show
      Hack any module lib.php and make sure that modulename_supports() return something non-standard, like array or string or big integer Make sure you are able to add this module to the course (it appears in the "add activity or resource" window) After the module is added go to course view page, switch to editing mode and make sure that no warnings are displayed

      I have just come across this Warning/error while trying to find a fix for another bug in Clean theme. I found the same warning in Afterburner after quickly changing to that theme.

      The warning appeared as I turned Editing on in a course page. The warning message was in ever topic header. Going to Home page the message was there too, but this time above the page-header (Afterburner).

      This is the warning message and stack trace.

      Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in C:\wamp\www\moodle26\course\renderer.php on line 372
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0027	836208	{main}( )	..\index.php:0
      2	0.7515	39625544	core_renderer->header( )	..\index.php:99
      3	0.7757	40302568	core_renderer->render_page_layout( )	..\outputrenderers.php:777
      4	0.7761	40417680	include( 'C:\wamp\www\moodle26\theme\afterburner\layout\default.php' )	..\outputrenderers.php:847
      5	0.8700	50367728	block_manager->region_has_content( )	..\default.php:6
      6	0.8701	50367728	block_manager->ensure_content_created( )	..\blocklib.php:353
      7	0.8701	50367936	block_manager->create_block_contents( )	..\blocklib.php:1003
      8	4.3932	88274144	block_base->get_content_for_output( )	..\blocklib.php:951
      9	4.3933	88276336	block_list->formatted_contents( )	..\moodleblock.class.php:238
      10	4.3933	88276336	block_site_main_menu->get_content( )	..\moodleblock.class.php:764
      11	4.5842	88335080	core_course_renderer->course_section_add_cm_control( )	..\block_site_main_menu.php:131
      12	4.6722	97153288	array_key_exists ( )	..\renderer.php:372
      

            marina Marina Glancy
            lazydaisy Mary Evans
            Dan Poltawski Dan Poltawski
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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