Visitar URL original
Fix #20525 - Undefined global variable $maxsize by HawkForge · Pull Request #20587 · phpmyadmin/phpmyadmin · GitHub
Skip to content

Fix #20525 - Undefined global variable $maxsize - #20587

Open
HawkForge wants to merge 1 commit into
phpmyadmin:QA_5_2from
HawkForge:fix/20525-undefined-maxsize
Open

HawkForge wants to merge 1 commit into
phpmyadmin:QA_5_2from
HawkForge:fix/20525-undefined-maxsize

Conversation

@HawkForge

Copy link
Copy Markdown

Description

When an export request is submitted without the maxsize parameter ("Skip tables larger than"), Export::exportDatabase() reads $GLOBALS['maxsize'], which was never set, because ExportController only copies POST parameters that are present into the globals. On PHP 8.1+ this triggers "Undefined global variable $maxsize" (reported at https://reports.phpmyadmin.net/incidents/view/2969944).

This defaults the value to an empty string, which the existing check already treats as "no size limit". A regression test is added to ExportTest.

Fixes #20525

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch (QA_5_2, bug in 5.2.4-dev).
  • Every commit has proper Signed-off-by line as described in our DCO.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own.
  • Any new functionality is covered by tests.

Replaces #20526, which got closed when my fork was accidentally detached.

Default to an empty string when the maxsize parameter is not sent with
the export request.

Signed-off-by: HawkForge <75696486+HawkForge@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant