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

Remove array_key_exists() on objects

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Verify that https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/611/ (it uses php74rc4) ends without any error related to "array_key_exists". (open console and search for it. Note that, for the time being, there are lots of errors and failures, here we are only interested in the "array_key_exists" ones)
      2. Ensure that automated tests (phpunit and behat) don't fail for php71 and php73.
      Show
      Verify that https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/611/ (it uses php74rc4) ends without any error related to "array_key_exists" . (open console and search for it. Note that, for the time being, there are lots of errors and failures, here we are only interested in the "array_key_exists" ones) Ensure that automated tests (phpunit and behat) don't fail for php71 and php73.
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:

      Description

      It has been advised since long ago that the ability of array_key_exists() to work on object properties was far from ideal.

      With php74 such uses have become officially deprecated with message:

      array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
      

      This issue is about perform the needed replacements, ensuring that everything continues working ok.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Peer reviewer:
                Tim Hunt
                Integrator:
                Jun Pataleta
                Tester:
                CiBoT
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Adrian Greeve, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Jun Pataleta, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/19

                  Time Tracking

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