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

Uncaught TypeError: Argument 1 passed to PhpMyAdmin\\CheckUserPrivileges::__construct() must be an instance of PhpMyAdmin\\DatabaseInterface #14312

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

Comments

@ibennetch
Copy link
Member

ibennetch commented May 20, 2018

Using QA_4_8 or master.

I get this error when using the setup script. It may be triggered through other means as I have several of these in my logs, or it could all be from the same error. To reproduce, go in the setup script, press the "New server" button, and click "Apply" to use the defaults.

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PhpMyAdmin\\CheckUserPrivileges::__construct() must be an instance of PhpMyAdmin\\DatabaseInterface, null given, called in /var/www/pma-dev/fork/QA_4_8/libraries/check_user_privileges.inc.php on line 14 and defined in /var/www/pma-dev/fork/QA_4_8/libraries/classes/CheckUserPrivileges.php:30
Stack trace:
#0 /var/www/pma-dev/fork/QA_4_8/libraries/check_user_privileges.inc.php(14): PhpMyAdmin\\CheckUserPrivileges->__construct(NULL)
#1 /var/www/pma-dev/fork/QA_4_8/libraries/classes/Navigation/NavigationTree.php(20): require_once('/var/www/pma-de...')
#2 /var/www/pma-dev/fork/QA_4_8/vendor/composer/ClassLoader.php(444): include('/var/www/pma-de...')
#3 /var/www/pma-dev/fork/QA_4_8/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/var/www/pma-de...')
#4 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('PhpMyAdmin\\\\Navi...')
#5 /var/www/pma-dev/fork/QA_4_8/libraries/classes/Navigation/Navigation.php(52): spl_autoload_call('PhpMyAdmin\\\\Navi...')
# in /var/www/pma-dev/fork/QA_4_8/libraries/classes/CheckUserPrivileges.php on line 30, referer: http://192.168.1.10/pma-dev/fork/QA_4_8/setup/index.php?tab_hash=&check_page_refresh=1&token=WqR%7F%25JY%27a%5D%2BS%7Et%21X&page=servers&mode=add&token=WqR%7F%25JY%27a%5D%2BS%7Et%21X&submit=New+server
@akshgods
Copy link

akshgods commented Jun 7, 2018

getting error when in errorlog file first time setup on server with phpMyAdmin-4.8.1-all-languages

[07-Jun-2018 12:45:01 UTC] PHP Notice: Undefined index: dbi in /home/halotele/public_html/domains/domain.com/inhouse/PhMyAdmin/libraries/check_user_privileges.inc.php on line 14
[07-Jun-2018 12:45:01 UTC] PHP Catchable fatal error: Argument 1 passed to
PhpMyAdmin\CheckUserPrivileges::__construct() must be an instance of PhpMyAdmin\DatabaseInterface, null given, called in /home/halotele/public_html/domains/domain.com/inhouse/PhMyAdmin/libraries/check_user_privileges.inc.php on line 14 and defined in /home/halotele/public_html/domains/domain.com/inhouse/PhMyAdmin/libraries/classes/CheckUserPrivileges.php on line 30

@williamdes
Copy link
Member

Kind of the same error as #14752

@williamdes williamdes added the Bug A problem or regression with an existing feature label Nov 28, 2018
@williamdes
Copy link
Member

@MauricioFauth Can you please fix this one ?, I would add an if (isset($GLOBALS['dbi'])) to all the contents of libraries/check_user_privileges.inc.php but I am not sure this is a good idea..

@MauricioFauth MauricioFauth self-assigned this Mar 15, 2019
@MauricioFauth MauricioFauth added this to the 4.8.6 milestone Mar 15, 2019
@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

4 participants