problem with adminer-plugins.php #1230
-
|
Hello adminer community, The php error log shows: [27-Dec-2025 20:03:46 America/Regina] PHP Fatal error: Uncaught TypeError: AdminerLoginServers::__construct(): Argument #1 ($servers) must be of type array, string given, called in /vhosts/domain/myadmin/adminer-plugins.php on line 3 and defined in /vhosts/doamin/myadmin/adminer-plugins/login-servers.php:15 My question: can one of you help me to write the array needed correct ? Or point me to my mistakes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
in my opinion: The error happens because AdminerLoginServers expects the first argument AdminerLoginServers is designed to receive ALL servers in one array, Instead of creating multiple AdminerLoginServers objects, you should |
Beta Was this translation helpful? Give feedback.
in my opinion: The error happens because AdminerLoginServers expects the first argument
to be an array of servers, but you are passing a string.
AdminerLoginServers is designed to receive ALL servers in one array,
not one server per plugin instance.
Instead of creating multiple AdminerLoginServers objects, you should
'MySQL 5', '192.168.200.30:3320' => 'MySQL 8', ]) ]; This will show a server dropdown on the login page and fix the TypeError. Hope this helps for you :>create only one and pass an array like this: