From a5e042fa2afba68043390214d888a7d5493f0b9e Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 16 Jan 2020 09:10:56 +0100 Subject: [PATCH] Uninitialized string offset in main.inc Fixed for php >= 7.0 --- includes/main.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/main.inc b/includes/main.inc index 7b37055a..be058ed9 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -179,6 +179,9 @@ function js_compress($sJS) //loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string $len = strlen($line); + if (version_compare(PHP_VERSION, '7.0.0') >= 0) // uninitialized string offser error fix. @Braath Waate + $line .= chr(32); + for($j=0;$j<$len;$j++) { $c = $line[$j]; // this is _really_ faster than subst -- 2.30.2