summaryrefslogtreecommitdiff
path: root/maintenance/sqlite.inc
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
commitc9aa36da061816dee256a979c2ff8d2ee41824d9 (patch)
tree29f7002b80ee984b488bd047dbbd80b36bf892e9 /maintenance/sqlite.inc
parentb4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff)
parentd1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff)
Merge branch 'archwiki'
# Conflicts: # skins/ArchLinux.php # skins/ArchLinux/archlogo.gif
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;
}
-};
+}