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

detect buggy iconv() with //IGNORE and use mbstring if exists or warn admins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3
    • 2.3
    • Unit tests
    • None
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • w23_MDL-33007_m23_buggyiconv
    • Hide

      Run tests on:
      1/ on server with fully working iconv() (no notices when //IGNORE used)

      2/ on server with glibc (was throwing notices recently) - hq machines?

      3/ on server with completely broken icon WITH mbstring (returns false if //IGNORE used) - some redhat?

      4/ on server with borked iconv and WITHOUT mbstring

      expected:

      • 1-3 runs tests without any problems, no admin warning on /admin/index.php
      • 4 fails tests with explanation message and there is a warning on /admin/index.php
      Show
      Run tests on: 1/ on server with fully working iconv() (no notices when //IGNORE used) 2/ on server with glibc (was throwing notices recently) - hq machines? 3/ on server with completely broken icon WITH mbstring (returns false if //IGNORE used) - some redhat? 4/ on server with borked iconv and WITHOUT mbstring — expected: 1-3 runs tests without any problems, no admin warning on /admin/index.php 4 fails tests with explanation message and there is a warning on /admin/index.php

      I'm currently seeing unit test failures on test_fix_utf8 because of this bug in php affecting iconv https://bugs.php.net/bug.php?id=61484

      www-data@moodle:/home/nicols/git/software/moodle$ time phpunit --verbose lib/tests/moodlelib_test.php --stop-on-failure
      PHPUnit 3.6.10 by Sebastian Bergmann.
       
      Configuration read from /home/nicols/git/software/moodle/phpunit.xml
       
      .....F....................................
       
      Time: 2 seconds, Memory: 49.25Mb
       
      There was 1 failure:
       
      1) moodlelib_testcase::test_fix_utf8
      Failed asserting that false is identical to 'aaabbb'.
       
      /home/nicols/git/software/moodle/lib/tests/moodlelib_test.php:315
      /home/nicols/git/software/moodle/lib/phpunit/classes/advanced_testcase.php:76
       
      To re-run:
       phpunit moodlelib_testcase lib/tests/moodlelib_test.php
       
      FAILURES!
      Tests: 42, Assertions: 497, Failures: 1.
      PERF:  time: 1.59637s memory_total: 48629144B (46.4MB) memory_growth: 45826096B (43.7MB) memory_peak: 50255544B (47.9MB) includecount: 661 contextswithfilters: 0 filterscreated: 0 textsfiltered: 0 stringsfiltered: 0 langcountgetstring: 150 langcountmemcache: 185 langcountdiskcache: 0 includedyuimodules: 54 includedjsmodules: 2 db reads/writes: 501/287 ticks: 161 user: 62 sys: 5 cuser: 0 csys: 0 serverload: 0.00 
       
      real    0m1.681s
      user    0m0.676s
      sys     0m0.060s

      We may need to consider removing this unit test until php fix this upstream and then we should probably warn users about the incompatible versions of php

            skodak Petr Skoda
            dobedobedoh Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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