1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Always return array from table_status()

This commit is contained in:
Jakub Vrana
2025-03-26 01:34:48 +01:00
parent cd207238b7
commit cccc784da4
19 changed files with 28 additions and 49 deletions

View File

@@ -701,11 +701,11 @@ function friendly_url($val) {
/** Get status of a single table and fall back to name on error
* @param string
* @param bool
* @return array[] same as table_status()
* @return array one element from table_status()
*/
function table_status1($table, $fast = false) {
$return = table_status($table, $fast);
return ($return ?: array("Name" => $table));
return ($return ? reset($return) : array("Name" => $table));
}
/** Find out foreign keys for each column