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

dml_write_exception when calling tool_customlang_utils::checkout

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not a bug
    • 4.0
    • None
    • Language, Unit tests
    • None
    • MOODLE_400_STABLE

    Description

      In MariaDB (v10.5.13) and MySQL (v8.0.26), calling the tool_customlang_utils::checkout function throws an error:

      dml_write_exception: Error writing to database (Incorrect string value: '\xF0\x9F\x91\x8B' for column `moodle`.`phpu_tool_customlang`.`original` at row 1
      INSERT INTO phpu_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)
      [array (
        0 => 'en',
        1 => '495000',
        2 => 'welcomeback',
        3 => 'Welcome back, {$a->firstname}! 👋',
        4 => 'Welcome back, {$a->firstname}! 👋',
        5 => 1642067673,
        6 => 0,
        7 => NULL,
        8 => NULL,
      )])
      This error does not happen using PgSQL (v 14.1).

      Attachments

        Activity

          People

            Unassigned Unassigned
            rdebleu Renaat Debleu
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: