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

Call to a member function getColumns() on bool on normalization #16871

Closed
williamdes opened this issue Apr 29, 2021 · 7 comments
Closed

Call to a member function getColumns() on bool on normalization #16871

williamdes opened this issue Apr 29, 2021 · 7 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

Describe the bug

<a class="hide" id="update_recent_tables" href="index.php?route=/recent-table&ajax_request=1&recent_table=1&server=3"></a><br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function getColumns() on bool in libraries/classes/Normalization.php:389
Stack trace:
#0 libraries/classes/Controllers/NormalizationController.php(147): PhpMyAdmin\
ormalization-&gt;getHtmlContentsFor1NFStep3('public', 't1')
#1 libraries/classes/Routing.php(187): PhpMyAdmin\\Controllers\
ormalizationController-&gt;index(Array)
#2 index.php(18): PhpMyAdmin\\Routing::callControllerForRoute('/normalization', Object(FastRoute\\Dispatcher\\GroupCountBased), Object(Symfony\\Component\\DependencyInjection\\ContainerBuilder))
#3 {main}
  thrown in <b>libraries/classes/Normalization.php</b> on line <b>389</b><br />

To Reproduce

Steps to reproduce the behavior:

  1. Follow JS errors on normalisation process #16870

Expected behavior

No error

Server configuration

  • phpMyAdmin version: 5.1
@williamdes williamdes added 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 labels Apr 29, 2021
@williamdes williamdes added this to the 5.1.1 milestone Apr 29, 2021
@williamdes williamdes self-assigned this Apr 29, 2021
@williamdes williamdes added this to Needs triage in issues via automation Apr 29, 2021
@williamdes
Copy link
Member Author

Also

<strong>Warning</strong> in ./libraries/classes/Controllers/NormalizationController.php#117
Undefined array key &quot;newTables&quot;

<strong>Backtrace</strong>

Routing.php#187: PhpMyAdmin\\Controllers\
ormalizationController->index(array)
./../../../../index.php#18: PhpMyAdmin\\Routing::callControllerForRoute(
    string '/normalization',
    <Class:FastRoute\\Dispatcher\\GroupCountBased>,
    <Class:Symfony\\Component\\DependencyInjection\\ContainerBuilder>,
)

@williamdes
Copy link
Member Author

Also

<br />
<b>Fatal error</b>:  Uncaught TypeError: PhpMyAdmin\Normalization::getHtmlForNewTables3NF(): Argument #2 ($tables) must be of type array, stdClass given, called in libraries/classes/Controllers/NormalizationController.php on line 94 and defined in libraries/classes/Normalization.php:623
Stack trace:
#0 libraries/classes/Controllers/NormalizationController.php(94): PhpMyAdmin\Normalization-&gt;getHtmlForNewTables3NF(Object(stdClass), Object(stdClass), '&quot;'&quot;&gt;&lt;iframe onl...')
#1 libraries/classes/Routing.php(187): PhpMyAdmin\Controllers\NormalizationController-&gt;index(Array)
#2 index.php(18): PhpMyAdmin\Routing::callControllerForRoute('/normalization', Object(FastRoute\Dispatcher\GroupCountBased), Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#3 {main}
  thrown in <b>libraries/classes/Normalization.php</b> on line <b>623</b><br />

@williamdes
Copy link
Member Author

Param Value
Error Type TypeError
Error Message dataParsed is null
Exception Type js
phpMyAdmin version 5.1.0
Incident count 2
Link Report#70239

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member Author

After fixes, more fixes are needed

<b>Fatal error</b>:  Uncaught TypeError: PhpMyAdmin\\Normalization::createNewTablesFor3NF(): Argument #1 ($newTables) must be of type array, stdClass given, called in libraries/classes/Controllers/NormalizationController.php on line 118 and defined in libraries/classes/Normalization.php:690
Stack trace:
#0 libraries/classes/Controllers/NormalizationController.php(118): PhpMyAdmin\\Normalization-&gt;createNewTablesFor3NF(Object(stdClass), '&quot;'&quot;&gt;&lt;iframe onl...')
#1 libraries/classes/Routing.php(187): PhpMyAdmin\\Controllers\\NormalizationController-&gt;index(Array)
#2 index.php(18): PhpMyAdmin\\Routing::callControllerForRoute('/normalization', Object(FastRoute\\Dispatcher\\GroupCountBased), Object(Symfony\\Component\\DependencyInjection\\ContainerBuilder))
#3 {main}
  thrown in <b>libraries/classes/Normalization.php</b> on line <b>690</b>

@williamdes
Copy link
Member Author

<strong>Warning</strong> in ./libraries/classes/CreateAddField.php#43
<img src="themes/dot.gif" title="" alt="" class="icon ic_s_error"> Undefined array key &quot;primary_indexes&quot;

<strong>Backtrace</strong>

CreateAddField.php#289: PhpMyAdmin\CreateAddField->getIndexedColumns()
CreateAddField.php#522: PhpMyAdmin\CreateAddField->getColumnCreationStatements(boolean false)
AddFieldController.php#111: PhpMyAdmin\CreateAddField->tryColumnCreationQuery(
	string '&quot;\'&quot;&gt;&lt;iframe onload=alert(1)&gt;шеллы',
	string 'event',
	string 'index.php?route=/table/sql&amp;db=%22%27%22%3E%3Ciframe+onload%3Dalert%281%29%3E%D1%88%D0%B5%D0%BB%D0%BB%D1%8B&amp;table=event',
)
Routing.php#187: PhpMyAdmin\Controllers\Table\AddFieldController->index(array)
./../../../../index.php#18: PhpMyAdmin\Routing::callControllerForRoute(
	string '/table/add-field',
	<Class:FastRoute\Dispatcher\GroupCountBased>,
	<Class:Symfony\Component\DependencyInjection\ContainerBuilder>,
)

@williamdes
Copy link
Member Author

image

Fatal error: Uncaught TypeError: PhpMyAdmin\Normalization::getHtmlForNewTables2NF(): Argument
#1 ($partialDependencies) must be of type array, stdClass given, called in libraries/classes/Controllers/NormalizationController.php on line 85 and defined in libraries/classes/Normalization.php:510 Stack trace:
#0 libraries/classes/Controllers/NormalizationController.php(85): PhpMyAdmin\Normalization->getHtmlForNewTables2NF(Object(stdClass), 'batch_log2')
#1 libraries/classes/Routing.php(187): PhpMyAdmin\Controllers\NormalizationController->index(Array)
#2 index.php(18): PhpMyAdmin\Routing::callControllerForRoute('/normalization', Object(FastRoute\Dispatcher\GroupCountBased), Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#3 {main} thrown in libraries/classes/Normalization.php on line 510

@williamdes
Copy link
Member Author

<b>Fatal error</b>:  Uncaught TypeError: PhpMyAdmin\Normalization::createNewTablesFor2NF(): Argument #1 ($partialDependencies) must be of type array, stdClass given, called in libraries/classes/Controllers/NormalizationController.php on line 111 and defined in libraries/classes/Normalization.php:545
Stack trace:
#0 libraries/classes/Controllers/NormalizationController.php(111): PhpMyAdmin\Normalization-&gt;createNewTablesFor2NF(Object(stdClass), Object(stdClass), 'batch_log2', '&quot;'&quot;&gt;&lt;iframe onl...')
#1 libraries/classes/Routing.php(187): PhpMyAdmin\Controllers\NormalizationController-&gt;index(Array)
#2 index.php(18): PhpMyAdmin\Routing::callControllerForRoute('/normalization', Object(FastRoute\Dispatcher\GroupCountBased), Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#3 {main}
  thrown in <b>libraries/classes/Normalization.php</b> on line <b>545</b><br />

williamdes added a commit that referenced this issue Apr 29, 2021
Fixes: #16870

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 29, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 29, 2021
Fixes: #16870

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 29, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes changed the title Call to a member function getColumns() on bool on normalisation Call to a member function getColumns() on bool on normalization Apr 29, 2021
issues automation moved this from Needs triage to Closed Apr 29, 2021
williamdes added a commit that referenced this issue Jun 23, 2021
…lerTest and add assert response success

Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2022
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

1 participant