** Changed in: mahara
Assignee: (unassigned) => Cecilia Vela Gurovic (ceciliavg)
** Changed in: mahara
Status: New => In Progress
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1824386
Title:
Inappropriate comparison for DB versions
Status in Mahara:
In Progress
Bug description:
Relevant code from htdocs/init.php
if (is_postgres()) {
$okversion = '8.3';
$dbfriendlyname = 'PostgreSQL';
}
else if (is_mysql()) {
$okversion = '5.0.25';
$dbfriendlyname = 'MySQL';
}
if (floatval($dbversion['version']) < floatval($okversion)) {
throw new ConfigSanityException(get_string('dbversioncheckfailed',
'error', $dbfriendlyname, $dbversion['version'], $okversion));
}
floatval() on those strings will return, at best, the major version number,
and while I think it's unlikely that people are going to be running 19.04 on
PGSQL 8.2, right now the system wouldn't be able to detect that.
Switching out to version_compare would be a proper and safe comparison
for this.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1824386/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help : https://help.launchpad.net/ListHelp