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

Notices: Add helper for reset() with expression

This commit is contained in:
Jakub Vrana
2025-03-23 21:38:36 +01:00
parent 0501846743
commit f5ecb18896
5 changed files with 13 additions and 4 deletions

View File

@@ -847,6 +847,15 @@ function file_unlock($fp) {
fclose($fp);
}
/** Get first element of an array
* @param array
* @return mixed or false if not found
*/
function first($array) {
// reset(f()) triggers a notice
return reset($array);
}
/** Read password from file adminer.key in temporary directory or create one
* @param bool
* @return string or false if the file can not be created