-
Bug
-
Resolution: Fixed
-
Major
-
2.7.7, 2.8.5
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
wip_
MDL-49631_29_utfregex -
-
The trouble was discovered today by unit tests after moodle.org added Ukraine moot with borked UTF8 encoding.
There was 1 failure:
1) core_calendar_lib_testcase::test_calendar_cron_working_url
Failed asserting that 'Updating calendar subscriptions:
... started 16:38:36. Current memory use 51.3MB.
Updating calendar subscription test in course 1
Error updating calendar subscription: Error writing to database (ERROR: invalid byte sequence for encoding "UTF8": 0xd1 0x20
INSERT INTO phpmx_event (name,description,timestart,timeduration,uuid,timemodified,subscriptionid,userid,groupid,courseid,eventtype,format) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) RETURNING id
[array (
'name' => 'MoodleMoot Ukraine 2015',
'description' => 'Теорія і практика використання системи управління навчанням Moo dleКиївський національний університет будівництва і ар? ітектури, 21-22 тра вня 2015 р.http://2015.moodlemoot.in.ua/ ',
'timestart' => 1432191600,
'timeduration' => 115200,
'uuid' => '38598877@moodle.org',
'timemodified' => 1427081918,
'subscriptionid' => '1',
'userid' => 0,
'groupid' => '0',
'courseid' => '1',
'eventtype' => 'site',
'format' => '1',
)])
Finished updating calendar subscriptions.
' matches PCRE pattern "/Events imported: .* Events updated:/".
/Users/skodak/server/workspace/moodle/lib/phpunit/classes/advanced_testcase.php:80
To re-run:
vendor/bin/phpunit --colors core_calendar_lib_testcase calendar/tests/lib_test.php
Solution is to use in calendar_add_icalendar_event()
$description = preg_replace('/\s+/u', ' ', $description);
|
$description = preg_replace('/\s+/', ' ', $description);
|
Also the sloppy test should be fixed to use the exttests repository instead of live moodle.org server
- has been marked as being related by
-
MDL-49648 Kill phpunit tests external dependencies...
- Open