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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.10, 4.0
    • Fix Version/s: 3.8.6, 3.9.3
    • Component/s: Badges
    • Labels:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lameze Simey Lameze
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Michael Hawkins
              Integrator:
              Andrew Lyons
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  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