Skip to content

getThemeUniqueValue error in master #14213

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

Closed
ibennetch opened this issue Apr 20, 2018 · 3 comments
Closed

getThemeUniqueValue error in master #14213

ibennetch opened this issue Apr 20, 2018 · 3 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@ibennetch
Copy link
Member

With current master, I get the following error:

[Thu Apr 19 19:20:37.314536 2018] [php7:error] [pid 2593] [client 192.168.56.1:50712] PHP Fatal error: Uncaught TypeError: Return value of PhpMyAdmin\Config::getThemeUniqueValue() must be of the type integer, float returned in /var/www/pma-dev/fork/libraries/classes/Config.php:1207\nStack trace:\n#0 /var/www/pma-dev/fork/libraries/classes/Header.php(674): PhpMyAdmin\Config->getThemeUniqueValue()\n#1 /var/www/pma-dev/fork/libraries/classes/Header.php(407): PhpMyAdmin\Header->_getLinkTags()\n#2 /var/www/pma-dev/fork/libraries/classes/Response.php(266): PhpMyAdmin\Header->getDisplay()\n#3 /var/www/pma-dev/fork/libraries/classes/Response.php(279): PhpMyAdmin\Response->_getDisplay()\n#4 /var/www/pma-dev/fork/libraries/classes/Response.php(438): PhpMyAdmin\Response->_htmlResponse()\n#5 [internal function]: PhpMyAdmin\Response->response()\n#6 {main}\n thrown in /var/www/pma-dev/fork/libraries/classes/Config.php on line 1207

It seems to be caused by af3b424, in particular

-    public function getThemeUniqueValue()
+    public function getThemeUniqueValue(): int
@ibennetch
Copy link
Member Author

@MauricioFauth Could you take a look when you have a chance since this is related to a change you've made?

@Vaggal
Copy link
Contributor

Vaggal commented Apr 21, 2018

This seems to be caused by the addition of unix timestamps. The resulting sum is bigger than PHP_INT_MAX so PHP casts it to float.

@MauricioFauth MauricioFauth self-assigned this Apr 28, 2018
@MauricioFauth MauricioFauth added the Bug A problem or regression with an existing feature label Apr 28, 2018
@MauricioFauth MauricioFauth added this to the 5.0.0 milestone Apr 28, 2018
@MauricioFauth
Copy link
Member

Thanks for reporting this @ibennetch and thanks for investigating this @Vaggal.

@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
Bug A problem or regression with an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants