summaryrefslogtreecommitdiff
path: root/maintenance/sqlite.inc
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /maintenance/sqlite.inc
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'maintenance/sqlite.inc')
-rw-r--r--maintenance/sqlite.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/maintenance/sqlite.inc b/maintenance/sqlite.inc
index 08188cad..5c0fd07f 100644
--- a/maintenance/sqlite.inc
+++ b/maintenance/sqlite.inc
@@ -40,9 +40,9 @@ class Sqlite {
* Checks given files for correctness of SQL syntax. MySQL DDL will be converted to
* SQLite-compatible during processing.
* Will throw exceptions on SQL errors
- * @param $files
+ * @param array|string $files
* @throws MWException
- * @return mixed 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;
}
-};
+}