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

PhpMyAdmin\Core::getRealSize('8000M') returns a float instead of an int #15926

Closed
BaseMax opened this issue Feb 6, 2020 · 5 comments · Fixed by #15928
Closed

PhpMyAdmin\Core::getRealSize('8000M') returns a float instead of an int #15926

BaseMax opened this issue Feb 6, 2020 · 5 comments · Fixed by #15928
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

@BaseMax
Copy link
Contributor

BaseMax commented Feb 6, 2020

Describe the bug

There were some serious issues after upgrading the PHP of server to PHP version 7.4.
I tried to fix some of them. But there are still problems.
I also downloaded the latest version of the script so it might be compatible with PHP 7.4.
But it seems that PHPMyAdmin is not yet compatible with PHP 7.4.

The old script has been working with php 7.4, but it always shows errors. But it worked anyway. But the errors were annoying.

Error:

Fatal error: Uncaught TypeError: Return value of PhpMyAdmin\Core::getRealSize() must be of the type int, float returned in /service/control/phpmyadmin/libraries/classes/Core.php:429 Stack trace: #0 /service/control/phpmyadmin/libraries/classes/Config.php(1301): PhpMyAdmin\Core::getRealSize('8000M') #1 /service/control/phpmyadmin/libraries/classes/Config.php(161): PhpMyAdmin\Config->checkUploadSize() #2 /service/control/phpmyadmin/libraries/classes/Config.php(139): PhpMyAdmin\Config->checkSystem() #3 [internal function]: PhpMyAdmin\Config->__construct('/site/aterd.com...') #4 /service/control/phpmyadmin/vendor/symfony/dependency-injection/ContainerBuilder.php(1144): ReflectionClass->newInstanceArgs(Array) #5 /service/control/phpmyadmin/vendor/symfony/dependency-injection/ContainerBuilder.php(618): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'config') #6 /site/aterd.com/sub-p in /service/control/phpmyadmin/libraries/classes/Core.php on line 429

To Reproduce

Steps to reproduce the behavior:

  1. Upload phpmyadmin script to server
  2. Open phpmyadmin/ in browser at client systems

Expected behavior

See panel

Server configuration

  • Operating system: FreeBSD 12.0-RELEASE
  • Web server: nginx/1.16.1
  • Database version: 10.4.6-MariaDB
  • PHP version: 7.4.2
  • phpMyAdmin version: Version 5.1.0-dev

Client configuration

  • Browser: All
  • Operating system: Gnu/Linux
@williamdes
Copy link
Member

Hi @BaseMax we are php 7.4 compatible
The error you have is caused by a php uni setting

@yashrajbothra do you want do have a look?
Maybe adding a test case will be needed to reproduce the issue (using the stack trace data)

We will keep you updated as soon as possible

Thank you for reporting this issue

@williamdes williamdes added the Bug A problem or regression with an existing feature label Feb 6, 2020
@williamdes williamdes added this to Needs triage in issues via automation Feb 6, 2020
@williamdes williamdes added this to the 5.0.2 milestone Feb 6, 2020
@williamdes williamdes changed the title Incompatibility with PHP 7.4! PhpMyAdmin\Core::getRealSize('8000M') returns a float instead of an int Feb 6, 2020
@yashrajbothra
Copy link
Contributor

  1. Upload phpmyadmin script to server

Hey @williamdes which script they are reffering to?

@BaseMax
Copy link
Contributor Author

BaseMax commented Feb 6, 2020

Solved. 👍 #15928
Please check my Pull request.

Hey @williamdes which script they are reffering to?

Dev version (Last)

BaseMax added a commit to MaxFork/phpmyadmin that referenced this issue Feb 6, 2020
Signed-off-by: Max Base <Max@Asrez.com>
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Feb 7, 2020
@williamdes
Copy link
Member

#15932

BaseMax added a commit to MaxFork/phpmyadmin that referenced this issue Feb 7, 2020
Signed-off-by: Seyyed Ali Mohammadieh <Max@Asrez.com>
BaseMax added a commit to MaxFork/phpmyadmin that referenced this issue Feb 7, 2020
Signed-off-by: Max Base <Max@Asrez.com>
@williamdes
Copy link
Member

#15936

BaseMax added a commit to MaxFork/phpmyadmin that referenced this issue Feb 8, 2020
Signed-off-by: Seyyed Ali Mohammadieh <Max@Asrez.com>
Signed-off-by: Max Base <Max@Asrez.com>
BaseMax added a commit to MaxFork/phpmyadmin that referenced this issue Feb 8, 2020
Signed-off-by: Max Base <Max@Asrez.com>
BaseMax added a commit to MaxFork/phpmyadmin that referenced this issue Feb 9, 2020
@williamdes williamdes self-assigned this Feb 9, 2020
williamdes pushed a commit to MaxFork/phpmyadmin that referenced this issue Feb 10, 2020
Signed-off-by: Seyyed Ali Mohammadieh <Max@Asrez.com>
williamdes added a commit that referenced this issue Feb 10, 2020
…ns a float instead of an int

Pull-request: #15928
Fixes: #15926
Closes: #15932

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Feb 10, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes linked a pull request Feb 10, 2020 that will close this issue
6 tasks
issues automation moved this from Needs triage to Closed Feb 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2021
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

Successfully merging a pull request may close this issue.

3 participants