X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fmain.inc;h=be058ed9293306e1fa933b09b09a1df1b8dd218d;hb=b71d9175e95d1a4520674f8adaa0cc46d1659447;hp=bd2463f0cc549e0cbf24e4dd9941cb89c9a312d8;hpb=c57a65eca46110b7e4a865dc2b007c1fd75838c3;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index bd2463f0..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 @@ -439,7 +442,7 @@ function random_id($strength = 128) for($i=0; $i < $n; $i++) $bin .= chr(mt_rand(0, 255)); // Mersene Twister generator } - $id = strtr(base64_encode($bin), '+/', '-_'); // see RFC 4648 Section 5 + $id = strtr(base64_encode($bin), '+/=', '-_x'); // see RFC 4648 Section 5 return $id; }