Skip to content

Commit 4a5b9b1

Browse files
committed
Fix #46
1 parent bbec6bb commit 4a5b9b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

phpminiadmin.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,11 @@ function get_db_select($sel=''){
678678
$arr=$_SESSION['sql_sd'];
679679
}else{
680680
$arr=db_array($SHOW_D,NULL,1);
681-
if (!is_array($arr)){
682-
$arr=[0 => array('Database' => $DB['db'])];
683-
}
681+
if (!is_array($arr) || !$arr){
682+
$cur=db_value("SELECT DATABASE()",NULL,1);
683+
if (!$cur) $cur=$DB['db'];
684+
$arr=[['Database'=>$cur]];
685+
}
684686
$_SESSION['sql_sd']=$arr;
685687
}
686688
return @sel($arr,'Database',$sel);

0 commit comments

Comments
 (0)