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

Remove array_key_exists() on objects

    XMLWordPrintable

Details

    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_38_STABLE
    • 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.

    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

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Tim Hunt Tim Hunt
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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