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

Comments

Projects
None yet
3 participants
@StarWolf3000
Copy link

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

XML Export from single table throws fatal error (PHP 7.2): phpmyadmin…
…#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

XML Export from single table throws fatal error (PHP 7.2): phpmyadmin…
…#14212 issue fixed

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

This comment has been minimized.

Copy link
Contributor

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 added the bug label May 4, 2018

@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

XML Export from single table throws fatal error (PHP 7.2): #14212 iss…
…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

Add ChangeLog entry for #14212
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.