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

php function array_key_exists() not supported in version 5.3 anymore [replaced by property_exists()]

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9, 2.0
    • 2.0
    • General, PHPDoc
    • None
    • php 5.3
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • MOODLE_20_STABLE

    Description

      i have upgraded my local devel server (debian 5 unstable)
      from php 5.2.10 to php 5.3 a while ago.

      and while working on a new block i found out that function array_key_exists()
      has a compatibility issue with php version 5.3.

      it is replaced with property_exists()

      http://il2.php.net/array_key_exists

      PHP Version Description
      5.3.0 This function doesn't work with objects anymore, property_exists() should be used in this case.

      and there is allot (398 uses) of places in the code of version 1.9.5+ of that function.
      http://xref.moodle.org/_functions/index.html#array_key_exists

      i set this issue to major, i hope it is a minor one, thou.

      Attachments

        Activity

          People

            skodak Petr Skoda
            nadavkav Nadav Kavalerchik
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              24/Nov/10