We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--- lib/database.php 2019-04-03 19:13:09.383859716 +0800 +++ lib/database.php 2019-04-08 01:00:51.986580645 +0800 @@ -642,7 +642,7 @@ @param $log - whether to log error messages, defaults to true @returns - (bool) the output of the sql query as a single variable */ function db_index_exists($table, $index, $log = true, $db_conn = false) { - global $database_log; + global $database_log, $config; if (!isset($database_log)) { $database_log = false; } @@ -670,7 +670,7 @@ @param $log - whether to log error messages, defaults to true @returns - (bool) the output of the sql query as a single variable */ function db_index_matches($table, $index, $columns, $log = true, $db_conn = false) { - global $database_log; + global $database_log, $config; if (!isset($database_log)) { $database_log = false; } @@ -924,7 +924,7 @@ $del = array_diff($index, $k['columns']); if (!empty($add) || !empty($del)) { if (!db_execute("ALTER TABLE `$table` DROP INDEX `$n`", $log, $db_conn) || - !db_execute("ALTER TABLE `$table` ADD INDEX `$n` (" . $k['name'] . '` (' . db_format_index_create($key['columns']) . ')', $log, $db_conn)) { + !db_execute("ALTER TABLE `$table` ADD INDEX `$n` (" . $k['name'] . '` (' . db_format_index_create($k['columns']) . ')', $log, $db_conn)) { return false; } } @@ -944,7 +944,7 @@ if (isset($data['keys'])) { foreach ($data['keys'] as $k) { if (!isset($allindexes[$k['name']])) { - if (!db_execute("ALTER TABLE `$table` ADD INDEX `" . $k['name'] . '` (' . db_format_index_create($key['columns']) . ')', $log, $db_conn)) { + if (!db_execute("ALTER TABLE `$table` ADD INDEX `" . $k['name'] . '` (' . db_format_index_create($k['columns']) . ')', $log, $db_conn)) { return false; } }
The text was updated successfully, but these errors were encountered:
Resolving Issue #2622
f408465
Various PHP undefined variable in database.php
Good catch. Resolved.
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: