X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fsqlite.inc;h=5c0fd07fbb92aaa7164f8b3dba6e0b36ffa5bfbb;hb=7f54095cb3188e8496de571a968689e73e2646a3;hp=6520e1381cc78851d0306ecfd968ac5027c0d5fc;hpb=ca895b7072b9d98a5b3abf8f2a46474095c16210;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sqlite.inc b/maintenance/sqlite.inc index 6520e1381c..5c0fd07fbb 100644 --- a/maintenance/sqlite.inc +++ b/maintenance/sqlite.inc @@ -42,7 +42,7 @@ class Sqlite { * Will throw exceptions on SQL errors * @param array|string $files * @throws MWException - * @return string|bool true if no error or error string in case of errors + * @return bool True if no error or error string in case of errors */ public static function checkSqlSyntax( $files ) { if ( !Sqlite::isPresent() ) { @@ -78,6 +78,7 @@ class Sqlite { foreach ( $columns as $col ) { if ( !isset( $allowedTypes[strtolower( $col->type )] ) ) { $db->close(); + return "Table {$table->name} has column {$col->name} with non-native type '{$col->type}'"; } } @@ -86,6 +87,7 @@ class Sqlite { return $e->getMessage(); } $db->close(); + return true; } -}; +}