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

Deprecated array_key_exists() on objects detected @ badges/mybadges.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.8.6, 3.9.3
    • 3.10, 4.0
    • Badges

      Detected while testing MDLQA-15375, with PHP 7.4.

      The badges/mybadges.php page, throws a good number of PHP deprecation notices:

      Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset()
      

      This is about fix them and, ideally, look if there are similar/invalid array_key_exists() uses with objects.

      Haven't checked if this also happens with older Moodle versions, may be it's old issue reproducible there, please check.

      Ciao

        1. 38_stable_tests.png
          405 kB
          Eloy Lafuente (stronk7)
        2. 39_stable_tests.png
          312 kB
          Eloy Lafuente (stronk7)
        3. MDL-70066 cannot use obj.png
          92 kB
          Simey Lameze

            lameze Simey Lameze
            stronk7 Eloy Lafuente (stronk7)
            Michael Hawkins Michael Hawkins
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 5 hours, 56 minutes
                1d 5h 56m

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