mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Fix type of permanentLogin()
This commit is contained in:
@@ -28,7 +28,7 @@ class Adminer {
|
||||
}
|
||||
|
||||
/** Get key used for permanent login
|
||||
* @return string cryptic string which gets combined with password or false in case of an error
|
||||
* @return string cryptic string which gets combined with password or '' in case of an error
|
||||
*/
|
||||
function permanentLogin(bool $create = false): string {
|
||||
return password_file($create);
|
||||
|
@@ -739,16 +739,16 @@ function first(array $array) {
|
||||
}
|
||||
|
||||
/** Read password from file adminer.key in temporary directory or create one
|
||||
* @return string|false false if the file can not be created
|
||||
* @return string '' if the file can not be created
|
||||
*/
|
||||
function password_file(bool $create) {
|
||||
function password_file(bool $create): string {
|
||||
$filename = get_temp_dir() . "/adminer.key";
|
||||
if (!$create && !file_exists($filename)) {
|
||||
return false;
|
||||
return '';
|
||||
}
|
||||
$fp = file_open_lock($filename);
|
||||
if (!$fp) {
|
||||
return false;
|
||||
return '';
|
||||
}
|
||||
$return = stream_get_contents($fp);
|
||||
if (!$return) {
|
||||
|
Reference in New Issue
Block a user