From 9582d7854388ccee60f6e0e72e1586ab0c839adc Mon Sep 17 00:00:00 2001 From: Timo Isik Date: Thu, 27 Apr 2023 16:03:21 +0200 Subject: [PATCH] Fixed pslam messages for request time usage --- src/Utils/Minify.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils/Minify.php b/src/Utils/Minify.php index 16e1261..ccb275a 100644 --- a/src/Utils/Minify.php +++ b/src/Utils/Minify.php @@ -12,7 +12,8 @@ public function process($html): string { $this->_html = str_replace("\r\n", "\n", trim($html)); - $this->_replacementHash = 'MINIFYHTML' . md5($_SERVER['REQUEST_TIME']); + $hash = isset($_SERVER['REQUEST_TIME']) ? (string) $_SERVER['REQUEST_TIME'] : (string) time(); + $this->_replacementHash = 'MINIFYHTML' . md5($hash); // replace PREs with placeholders $this->_html = preg_replace_callback('/\\s*]*?>[\\s\\S]*?<\\/pre>)\\s*/iu', [$this, '_removePreCB'], $this->_html);