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

lib/pear/HTML/QuickForm/date.php needs to fix curly brace string char accessor for php 7.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.9.5, 3.10.2
    • 3.9.3, 3.9.4, 3.10.1
    • Libraries
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • Easy
    • Hide

      Before the patch

      1. Using PHP 7.4
      2. Copy the attached test70457.php file to the moodle-root directory.
      3. From terminal, execute it (php test70457.php).
      4. Verify that you get the PHP deprecation notices: Deprecated: Array and string offset access syntax with curly braces is deprecated in ... lib/pear/HTML/QuickForm/date.php on line ...

      After the patch

      1. Repeat steps 1-3 from "Before the patch".
      2. Verify that there aren't deprecation notices anymore.
      Show
      Before the patch Using PHP 7.4 Copy the attached test70457.php file to the moodle-root directory. From terminal, execute it ( php test70457.php ). Verify that you get the PHP deprecation notices: Deprecated: Array and string offset access syntax with curly braces is deprecated in ... lib/pear/HTML/QuickForm/date.php on line ... After the patch Repeat steps 1-3 from "Before the patch". Verify that there aren't deprecation notices anymore.

      $sign = $this->_options['format']{$i};
      

      needs to be changed to

      $sign = $this->_options['format'][$i];
      

        1. MDL-70457.jpg
          MDL-70457.jpg
          29 kB
        2. test70457.php
          0.3 kB

            stronk7 Eloy Lafuente (stronk7)
            jameskinsman James Kinsman
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Jun Pataleta Jun Pataleta
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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