Upgrade runs in 7.3 versioncheck passes but switching to 8.1 I get the following errors:
Fatal error: Uncaught TypeError: ksort(): Argument #1 ($array) must be of type array, null given in /home/bobby0/public_html/stockdale7/include/functions.inc.php:4270 Stack trace: #0 /home/bobby0/public_html/stockdale7/include/functions.inc.php(4270): ksort() #1 /home/bobby0/public_html/stockdale7/include/functions.inc.php(896): languageSelect() #2 /home/bobby0/public_html/stockdale7/include/init.inc.php(442): load_template() #3 /home/bobby0/public_html/stockdale7/index.php(22): require('/home/bobby0/pu...') #4 {main} thrown in /home/bobby0/public_html/stockdale7/include/functions.inc.php on line 4270
Here is the code
// get list of available languages
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_LANGUAGE']}");
while ( ($row = $results->fetchArray()) ) {
if ($row['available'] == 'YES' && $row['enabled'] == 'YES' && file_exists('lang/'.$row['lang_id'].'.php')) {
$lang_language_data[$row['lang_id']] = $row;
}
} // while
$results->free();
// sort the array by English name
ksort($lang_language_data);
Add the line:
$lang_language_data = []; // <--- add this
// get list of available languages
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_LANGUAGE']}");