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

Fatal error: Unsupported operand types in Results.php #17315

Closed
michael-gilch opened this issue Jan 25, 2022 · 1 comment
Closed

Fatal error: Unsupported operand types in Results.php #17315

michael-gilch opened this issue Jan 25, 2022 · 1 comment
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@michael-gilch
Copy link

michael-gilch commented Jan 25, 2022

Describe the bug

SHOW PROCESSLIST; throws fatal error in latest version (5.1.2):

PHP Fatal error: Uncaught TypeError: Unsupported operand types: null + array in .../libraries/classes/Display/Results.php:2589

This seems to be caused by initializing $editCopyUrlParams = null; and later trying to append more elements without assigning a value:

Results.php, Line 2589:

'params' => $editCopyUrlParams + ['default_action' => 'update'],

To Reproduce

Steps to reproduce the behavior:

  1. Open PMAs SQL Editor.
  2. Type in "SHOW PROCESSLIST;"
  3. Click OK to execute the query

An internal server error (500) is shown

Expected behavior

Showing the process list's result set

Server configuration

  • Operating system: Debian
  • Web server: Apache
  • Database version: 5.7
  • PHP version: >=7.4
  • phpMyAdmin version: 5.1.2

Client configuration

  • Browser: Firefox
  • Operating system: Ubuntu

Additional context

For a quick fix you can check the value before joining arrays in every 'params' section:

'params' => ($editCopyUrlParams == null) ? ['default_action' => 'update'] : $editCopyUrlParams + ['default_action' => 'update'],
@williamdes williamdes self-assigned this Feb 3, 2022
@williamdes williamdes added the Bug A problem or regression with an existing feature label Feb 3, 2022
@williamdes williamdes added this to the 5.1.3 milestone Feb 3, 2022
@williamdes
Copy link
Member

Hi @michael-gilch
Thank you for the issue, I can confirm it on our demo server and in our static analysis tool reports.

williamdes added a commit that referenced this issue Feb 3, 2022
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Feb 3, 2022
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
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
Projects
None yet
Development

No branches or pull requests

2 participants