#850852 follow-up by Damien Tournoud: Fixed notices that caused tests to fail.
parent
a87da0d78a
commit
925722a804
|
@ -622,16 +622,13 @@ class DatabaseSchema_sqlite extends DatabaseSchema {
|
|||
}
|
||||
|
||||
public function findTables($table_expression) {
|
||||
// Don't use getPrefixInfo -- $table_expression includes the prefix.
|
||||
list($prefix, $table) = explode('.', $table_expression);
|
||||
if (empty($table)) {
|
||||
$table = $prefix;
|
||||
$prefix = NULL;
|
||||
}
|
||||
// Don't add the prefix, $table_expression already includes the prefix.
|
||||
$info = $this->getPrefixInfo($table_expression, FALSE);
|
||||
|
||||
// Can't use query placeholders because the query would have to be
|
||||
// :prefixsqlite_master, which does not work.
|
||||
$result = db_query("SELECT name FROM " . ($prefix ? $prefix . '.' : '') . "sqlite_master WHERE name LIKE :table_name", array(
|
||||
':table_name' => $table,
|
||||
$result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE name LIKE :table_name", array(
|
||||
':table_name' => $info['table'],
|
||||
));
|
||||
return $result->fetchAllKeyed(0, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue