Skip to content

Commit

Permalink
Fixing Cacti#4284 - Parameters in array_key_exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mchorsley committed May 29, 2021
1 parent cff7bd1 commit 6bb2bcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/upgrades/1_2_17.php
Expand Up @@ -173,14 +173,14 @@ function database_fix_mediumint_columns() {
$table = $t['Tables_in_' . $database_default];
$columns = array();

if (!array_key_exists($table, $tables, true)) {
if (!array_key_exists($table, $tables)) {
$columns = array_rekey(
db_fetch_assoc("SHOW COLUMNS FROM " . $table),
'Field', array('Type', 'Null', 'Key', 'Default', 'Extra')
);

foreach($columns as $field => $attribs) {
if (array_key_exists($field, $known_columns, true)) {
if (array_key_exists($field, $known_columns)) {
if (strpos($attribs['Type'], 'mediumint') === false) {
if (strpos($attribs['Type'], 'int(10) unsigned') !== false) {
continue;
Expand Down

0 comments on commit 6bb2bcf

Please sign in to comment.