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

[4.8.0] XML Export from single table throws fatal error (PHP 7.2) #14212

Closed
StarWolf3000 opened this issue Apr 19, 2018 · 1 comment
Closed

[4.8.0] XML Export from single table throws fatal error (PHP 7.2) #14212

StarWolf3000 opened this issue Apr 19, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@StarWolf3000
Copy link

@StarWolf3000 StarWolf3000 commented Apr 19, 2018

Steps to reproduce

  1. Run PMA 4.8.0 on PHP 7.2
  2. Open a database and switch to a single table
  3. Click "Export" tab and select "XML" for export

Expected behaviour

Server prepares XML file for download

Actual behaviour

PHP throws a fatal error (from Apache's error.log):

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PhpMyAdmin\\Plugins\\Export\\ExportXml::_setTables() must be of the type array, null given, called in /path/to/phpmyadmin/libraries/classes/Plugins/Export/ExportXml.php on line 64 and defined in /path/to/phpmyadmin/libraries/classes/Plugins/Export/ExportXml.php:574
Stack trace:
#0 /path/to/phpmyadmin/libraries/classes/Plugins/Export/ExportXml.php(64): PhpMyAdmin\\Plugins\\Export\\ExportXml->_setTables(NULL)
#1 /path/to/phpmyadmin/libraries/classes/Plugins/Export/ExportXml.php(212): PhpMyAdmin\\Plugins\\Export\\ExportXml->initSpecificVariables()
#2 /path/to/phpmyadmin/export.php(412): PhpMyAdmin\\Plugins\\Export\\ExportXml->exportHeader()
#3 {main}
thrown in /path/to/phpmyadmin/libraries/classes/Plugins/Export/ExportXml.php on line 574

Server configuration

Operating system: Debian GNU/Linux 9.2 (Stretch)

Web server: Apache 2.4 (2.4.25)

Database: MariaDB (10.2.14-MariaDB-10.2.14+maria~stretch)

PHP version: 7.2.4 (7.2.4-1+0~20180405085422.20+stretch~1.gbpbff9f0)

phpMyAdmin version: 4.8.0

Client configuration

Browser: Firefox 56

Operating system: Debian GNU/Linux 9.2 (Stretch) (Client is same machine as Server)

Piyush3079 added a commit to Piyush3079/phpmyadmin that referenced this issue Apr 20, 2018
…#14212 issue fixed

Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>
Piyush3079 added a commit to Piyush3079/phpmyadmin that referenced this issue Apr 20, 2018
…#14212 issue fixed

Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>
@Piyush3079
Copy link
Contributor

@Piyush3079 Piyush3079 commented Apr 22, 2018

The error was due to, while exporting a single table, a method _setTables looking for array of tables was called, which was receiving null as argument.

@mauriciofauth mauriciofauth self-assigned this May 4, 2018
@mauriciofauth mauriciofauth added this to the 4.8.1 milestone May 4, 2018
mauriciofauth added a commit that referenced this issue May 4, 2018
…ue fixed

Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>

(cherry picked from commit 5b35dba)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
mauriciofauth added a commit that referenced this issue May 4, 2018
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants