1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

fix mysql_version() for mariadb

This commit is contained in:
Fredrick Brennan 2022-08-20 12:45:56 -04:00 committed by GitHub
parent d6ea8db5ef
commit 9e63116338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ function mysql_version() {
$v = explode('.', $version); $v = explode('.', $version);
if (count($v) != 3) if (count($v) != 3)
return false; return false;
return (int) sprintf("%02d%02d%02d", $v[0], $v[1], $v[2]); return (int) sprintf("%02d%02d%02d", $v[0], $v[1], is_int($v[2]) ? (int)$v[2] : 0);
} }
function prepare($query) { function prepare($query) {