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

Use of deprecated dynamic property in odslib.class.php

XMLWordPrintable

      In the odslib.class.php the MoodleODSCell class uses a dynamic property, which results in a deprecation error when using PHP version 8.2/8.3.

      The dynamic property is $merge.

      https://github.com/moodle/moodle/blob/d015c4c21331831c73e7ca102eb9334bf20f25c4/lib/odslib.class.php#L410

      Dynamic properties' deprecation info from php watch:

      https://php.watch/versions/8.2/dynamic-properties-deprecated

       

      I also created the change for MOODLE_402_STABLE:

      Pull 4.2 Branch: MDL-83650-402_fix_ods_cell

      Pull 4.2 Diff URL: https://github.com/moodle/moodle/compare/MOODLE_402_STABLE...Cl3mensM:moodle:MDL-83650-402_fix_ods_cell

      Workflow passing: https://github.com/Cl3mensM/moodle/actions/runs/11710604791

       

      So, basically changed it for all versions that support PHP 8.2/8.3

       

      Steps to reproduce

      1. Login as admin
      2. Turn on full debug logging
      3. Go to http://yourmoodleurl/lib/tests/other/spreadsheettestpage.php and generate the ODS sample file by clicking "Test ODS format".
      4. Verify you see the deprecation error Creation of dynamic property MoodleODSCell::$merge is deprecated in the error log. In ubuntu this should live in /var/log/apache/error.log

            cl3mensm Cl3mensM
            cl3mensm Cl3mensM
            Daniel Ziegenberg Daniel Ziegenberg
            Safat Shahin Safat Shahin
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 59 minutes
                59m

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