Skip to content
New issue

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

PHP notice - Undefined index: column_info #16163

Closed
williamdes opened this issue Jun 5, 2020 · 2 comments
Closed

PHP notice - Undefined index: column_info #16163

williamdes opened this issue Jun 5, 2020 · 2 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@williamdes
Copy link
Member

williamdes commented Jun 5, 2020

Describe the bug

Php notice

To Reproduce

Notice in ./libraries/classes/SystemDatabase.php#63
 Undefined index: column_info

Backtrace

./view_create.php#150: PhpMyAdmin\SystemDatabase->getExistingTransformationData(string 'xxxxxxx')

Server configuration

  • phpMyAdmin version: 5.0.3-dev

Target branch: QA_5_0

@williamdes williamdes added Bug A problem or regression with an existing feature newbie good first issue labels Jun 5, 2020
@williamdes williamdes added this to the 5.0.3 milestone Jun 5, 2020
@olumide95
Copy link
Contributor

Can you please elaborate on what the issue is?

@williamdes
Copy link
Member Author

I think this issue reflects a lack of checking that

if ($cfgRelation['commwork']) {

Because this piece of code does the isset and access check :

if (isset($cfgRelation['column_info'])) {
if ($this->canAccessStorageTable($cfgRelation['column_info'])) {
$cfgRelation['commwork'] = true;
// phpMyAdmin 4.3+
// Check for input transformations upgrade.
$cfgRelation['mimework'] = $this->tryUpgradeTransformations();
}
}

It should be done

$pma_transformation_sql = sprintf(
"SELECT * FROM %s.%s WHERE `db_name` = '%s'",
Util::backquote($cfgRelation['db']),
Util::backquote($cfgRelation['column_info']),
$GLOBALS['dbi']->escapeString($db)
);

Or maybe on the call of:

$new_transformations_sql = $systemDb->getNewTransformationDataSql(

I am not too much sure about if the fix should be in view_create.php or in getNewTransformationDataSql

@williamdes williamdes changed the title Php notice - Undefined index: column_info PHP notice - Undefined index: column_info Jun 10, 2020
@williamdes williamdes self-assigned this Jun 10, 2020
@williamdes williamdes added has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete and removed good first issue newbie labels Jun 10, 2020
@williamdes williamdes added this to Closed in issues Jun 10, 2020
williamdes added a commit that referenced this issue Jun 10, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jun 10, 2020
…ionData

Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants