-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Search in database fails if locale not set to "en" #12881
Comments
Strangely, I'm unable to reproduce this, so I'll leave it for one of the other developers to comment about. This code is similar in QA_4_6 and master. |
It is important to have an up-to-date php-gettext to reproduce. (1.0.12) However please note that this is a PMA bug, not a gettext bug. The ngettext function definition says that the third parameter should be an int , but since version 1.0.12 they are enforcing it. |
Ah, that makes sense since I'm still on 1.0.11. Thanks for your diligent
research and detailed report.
|
Backport from 4.6.6 (see phpmyadmin#12881)
Backport from 4.6.6 (see phpmyadmin#12881) Signed-off-by: Сорокин Александр <ale10059@yandex.ru>
Backport from 4.6.6 (see phpmyadmin#12881) Signed-off-by: Сорокин Александр <ale10059@yandex.ru>
Backport from 4.6.6 (see phpmyadmin#12881) Signed-off-by: Сорокин Александр <ale10059@yandex.ru>
Backport from 4.6.6 (see phpmyadmin#12881) Signed-off-by: Сорокин Александр <ale10059@yandex.ru>
I have the same error, and fixed it changing the language from es_ES to EN, thank you! |
Steps to reproduce
Expected behaviour
Search returns results. You can see expected behaviour if your locale is "en"
Actual behaviour
I get an error message (locale dependant):
Error al procesar la petición
Código de error: 500
Texto de error: Internal Server Error
Error in php error log:
[09-Jan-2017 09:42:56 Europe/Madrid] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Select_string only accepts integers: 2883' in /usr/share/php/gettext/gettext.php:354
Stack trace:
#0 /usr/share/php/gettext/gettext.php(388): gettext_reader->select_string('2883')
#1 /usr/share/php/gettext/gettext.inc(293): gettext_reader->ngettext('%1$s match in <...', '%1$s matches in...', '2883')
#2 /usr/share/phpMyAdmin/libraries/DbSearch.php(331): _ngettext('%1$s match in <...', '%1$s matches in...', '2883')
#3 /usr/share/phpMyAdmin/libraries/DbSearch.php(283): PMA\libraries\DbSearch->_getResultsRow('MD5FaMiLyBeEr5M...', Array, true, '2883')
#4 /usr/share/phpMyAdmin/db_search.php(57): PMA\libraries\DbSearch->getSearchResults()
#5 {main}
thrown in /usr/share/php/gettext/gettext.php on line 354
Seems the problem is select_string only accepts integers but it is being passed a string because all mysql values are returned as strings and the value is not casted as integer.
Suggested fix (at least works for me):
Server configuration
Operating system: CentOS 6
Web server: Apache 2.4.18
Database: mySQL 5.6.34
PHP version: PHP 5.5.21
phpMyAdmin version:
Client configuration
Browser: Firefox 50.1
Operating system: XUbuntu 16.04
The text was updated successfully, but these errors were encountered: