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

tool_xmldb: Deprecated warnings in PHP 8.2 when creating field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.4
    • Database SQL/XMLDB
    • MOODLE_404_STABLE
    • MDL-81085-m403
    • MDL-81085-main
    • Hide

      To test, you should be running PHP 8.2 and should have developer debug enabled with messages displayed (under Site administration / Development / Debugging).

      1. In XMLDB, load any file and edit.
      2. Edit any table.
      3. Use 'New field' link to create a new field
      4. Fill in a name and set the type to 'text'
      5. Save changes
        • EXPECTED: There should not be any warning messages. The new field should be shown in the list of fields.
      Show
      To test, you should be running PHP 8.2 and should have developer debug enabled with messages displayed (under Site administration / Development / Debugging). In XMLDB, load any file and edit. Edit any table. Use 'New field' link to create a new field Fill in a name and set the type to 'text' Save changes EXPECTED: There should not be any warning messages. The new field should be shown in the list of fields.

      If you create a TEXT type field in PHP 8.2, it throws deprecated warnings.

      1. In XMLDB, load any file and edit.
      2. Edit any table.
      3. Use 'New field' link to create a new field
      4. Fill in a name and set the type to 'text'
      5. Save changes

      This results in the following error:

      strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
      

      Note: I encountered this when going through the database training module from the new Moodle developer skills course on Moodle Academy.

            quen Sam Marshall
            quen Sam Marshall
            Meirza Meirza
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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