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

getThemeUniqueValue error in master #14213

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

Comments

Projects
None yet
3 participants
@ibennetch
Member

ibennetch commented Apr 20, 2018

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

This comment has been minimized.

Member

ibennetch commented Apr 20, 2018

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

@Vaggal

This comment has been minimized.

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 label Apr 28, 2018

@mauriciofauth mauriciofauth added this to the 5.0.0 milestone Apr 28, 2018

@mauriciofauth

This comment has been minimized.

Member

mauriciofauth commented Apr 28, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment