From 57ead42c49853105c2357a881bcc4d0b05e8f763 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 9 Mar 2020 19:02:05 +0800 Subject: [PATCH] use '?random=jpg' to get an URL of a random file --- function/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function/common.php b/function/common.php index 79e4be1..76497b4 100644 --- a/function/common.php +++ b/function/common.php @@ -617,7 +617,7 @@ function main($path) $files = list_files($path); //echo json_encode(array_keys($files['children']), JSON_PRETTY_PRINT); - if ($_GET['random']!=='') { + if (isset($_GET['random'])&&$_GET['random']!=='') { if ($_SERVER['ishidden']<4) { $tmp = []; foreach (array_keys($files['children']) as $filename) {