Wrong variable name in minified version
Database management in a single PHP file
Brought to you by:
jakubvrana
Version 4.0.3 contains a wrong variable name in the compacted version in line 45.
instead of $l it should be $g in the English version and $h in the general.
The error is:
Fatal error: Call to a member function quote() on a non-object in D:...\Adminer\adminer-en.php on line 45
and happens when I click on a table.
When I change it manually it works fine.
It's this code and it's doing what it should be doing: https://github.com/vrana/adminer/blob/3e2288eee55a4483fed1df0c5afb1059288fda3d/adminer/include/functions.inc.php#L258
Perhaps you are trying to call q() in $adminer->login()?
I can't locate the problem. I override the functions schemas, databases, database, credentials, loginForm, name, databasesPrint, tableName, tablesPrint, navigation but I don't call quote in any of them.
I use the variable $driver locally in the function navigation but how can it have side effects with global $driver since I don't declare it as global?
I see that you have declared global $driver inside function q but then in the minified code in line 45 it is converted to $l instead of $g why?
Can you share code of your customization?
I have sent you a message with my customization
It should be fixed in the GitHub version. Please let me know if it works for you.
Thanks. I'll let you know.
This bug is still there in adminer-4.1.0-mysql-de.php, causing Adminer to abort when trying to show a table.
Line 47
should be
Did not test other languages.
The variable name is correct and it shouldn't cause any issues. Please put debug_print_backtrace(); on that place and send the output. It might be easier to do that with the source codes available at http://www.adminer.org/#download.
Looks like it only happens if you use adminer inside a function.
results in
line 47 changed to
prints this out:
I have encountered the same problem since 4.0.
Indeed it only happens when adminer is required in another file.
To workaround it you can do
But that simply means there is a missing global variable declaration somewhere.
I've tried including compiled Adminer from inside a function and it works correctly.