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:
@@ -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
|
||||
|
Reference in New Issue
Block a user