diff --git a/avatar.php b/avatar.php index 1365f61..08e04da 100644 --- a/avatar.php +++ b/avatar.php @@ -13,7 +13,7 @@ $uid = isset($_GET['uid']) ? $_GET['uid'] : 0; $size = isset($_GET['size']) ? $_GET['size'] : ''; $random = isset($_GET['random']) ? $_GET['random'] : ''; $type = isset($_GET['type']) ? $_GET['type'] : ''; -$check = $_GET['check_file_exists'] ?? ''; +$check = isset($_GET['check_file_exists']) ? $_GET['check_file_exists'] : ''; $avatar = './data/avatar/'.get_avatar($uid, $size, $type); if(file_exists(dirname(__FILE__).'/'.$avatar)) { @@ -41,7 +41,7 @@ if(empty($random)) { header('Location: '.SITEURL.'/'.$avatar_url); exit; -function get_avatar($uid, $size = 'middle', $type = ''): string +function get_avatar($uid, $size = 'middle', $type = '') { $size = in_array($size, array('big', 'middle', 'small')) ? $size : 'middle'; $uid = abs(intval($uid)); diff --git a/data/template/index.html b/data/template/index.html new file mode 100644 index 0000000..e69de29