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

detect buggy iconv() with //IGNORE and use mbstring if exists or warn admins (backport of MDL-32586 and MDL-33007)

XMLWordPrintable

    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • Hide

      This is about to execute lib/simpletest/testmoodlelib.php under certain conditions:

      1- TEST: unit tests pass under a "good" system (MacOS using mac ports LAMP stack, like the laptop integration server).

      2- TEST: unit tests pass under a "glibc" system (debian, ubuntu, like the "integrationci" integration server).

      3- TEST: unit tests pass under a "bad" system (redhat? or, alrernatively, hack fix_utf8() and set $buggyiconv = true, so fallback to mbstring will be used if available.

      4- TEST: unit test fail in a "completely borked" system. With the hack in previous point in action, disable mbstring (or hack the function_exists('mb_convert_encoding') check).

      Show
      This is about to execute lib/simpletest/testmoodlelib.php under certain conditions: 1- TEST: unit tests pass under a "good" system (MacOS using mac ports LAMP stack, like the laptop integration server). 2- TEST: unit tests pass under a "glibc" system (debian, ubuntu, like the "integrationci" integration server). 3- TEST: unit tests pass under a "bad" system (redhat? or, alrernatively, hack fix_utf8() and set $buggyiconv = true, so fallback to mbstring will be used if available. 4- TEST: unit test fail in a "completely borked" system. With the hack in previous point in action, disable mbstring (or hack the function_exists('mb_convert_encoding') check).

      This is a followup of MDL-32586 and MDL-33007, aimed to:

      • Improve fix_utf8() to avoid some annoying notices and provide mbstring() alternative for buggy iconv libraries (not supporting //IGNORE).
      • Inform the admin (in notifications page and/or environmental checks, to decide) about the site being run using a buggy iconv without mbstring alternative.

      To backport to 22 and 21, ideally, once the original issues have been tested in a bunch of OS/PHP combinations. I think this will make life really better for a lot of debian/ubuntu/redhat sites.

      Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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