White screen during utf8 conversion step of upgrade

Started by Oldiesmann, June 08, 2022, 10:27:57 PM

Previous topic - Next topic

Oldiesmann

Already submitted a PR to fix this, but posting this here as well in case anyone else runs into it. I upgraded a couple of older test boards (running 2.1 RC3 or RC4 on both - don't remember) and both times I got a white screen on step 6 of the upgrade (utf8 conversion). The error was "call to undefined function utf8_convert_case" in Load.php. Turns out whoever added that code didn't include the file where said function is defined.

Sources/Load.php

Find (line 237)
'convert_case' => function($string, $case, $simple = false, $form = 'c') use (&$smcFunc, $utf8, $ent_check, $fix_utf8mb4)
Replace
'convert_case' => function($string, $case, $simple = false, $form = 'c') use (&$smcFunc, $utf8, $ent_check, $fix_utf8mb4, $sourcedir)
Find (lines 292-293)
else
$string = $smcFunc['normalize'](utf8_convert_case($string, $case, $simple), $form);

Replace
else
{
include_once($sourcedir . '/Subs-Charset.php');
$string = $smcFunc['normalize'](utf8_convert_case($string, $case, $simple), $form);
}
Michael Eshom
Christian Metal Fans

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: