Skip to content

Commit

Permalink
Fixed pslam messages for request time usage
Browse files Browse the repository at this point in the history
  • Loading branch information
timoisik committed Apr 27, 2023
1 parent 3d1ddac commit 9582d78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Utils/Minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/iu', [$this, '_removePreCB'], $this->_html);
Expand Down

0 comments on commit 9582d78

Please sign in to comment.