openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit 36899186b8227552400259f83df579fc28ed077a
parent b2db938bc5cf7ae728e66e1b1028349b8ad5fcdc
Author: Jan Dankert <develop@jandankert.de>
Date:   Sun,  4 Oct 2020 23:33:37 +0200

Fix: Now compatible with PHP 7.4.

Diffstat:
Mmodules/util/Less.php | 16++++++++--------
Mmodules/util/Text.class.php | 10+++++-----
2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/util/Less.php b/modules/util/Less.php @@ -9705,7 +9705,7 @@ class Less_Exception_Chunk extends Less_Exception_Parser{ case 40: $parenLevel++; $lastParen = $this->parserCurrentIndex; - continue; + break; // ) case 41: @@ -9713,18 +9713,18 @@ class Less_Exception_Chunk extends Less_Exception_Parser{ if( $parenLevel < 0 ){ return $this->fail("missing opening `(`"); } - continue; + break; // ; case 59: //if (!$parenLevel) { $this->emitChunk(); } - continue; + break; // { case 123: $level++; $lastOpening = $this->parserCurrentIndex; - continue; + break; // } case 125: @@ -9734,7 +9734,7 @@ class Less_Exception_Chunk extends Less_Exception_Parser{ } //if (!$level && !$parenLevel) { $this->emitChunk(); } - continue; + break; // \ case 92: if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; continue; } @@ -10328,9 +10328,9 @@ class Less_SourceMap_Generator extends Less_Configurable { $basePath = $this->getOption('sourceMapBasepath'); // "Trim" the 'sourceMapBasepath' from the output filename. - if (strpos($filename, $basePath) === 0) { - $filename = substr($filename, strlen($basePath)); - } + //if (strpos($filename, strval($basePath)) === 0) { + // $filename = substr($filename, strlen($basePath)); + //} // Remove extra leading path separators. if(strpos($filename, '\\') === 0 || strpos($filename, '/') === 0){ diff --git a/modules/util/Text.class.php b/modules/util/Text.class.php @@ -391,17 +391,17 @@ class Text //$txt = html_entity_decode($txt); $txt2 = ''; for ($i = 0; $i < strlen($txt); $i++) { - $o = ord($txt{$i}); + $o = ord($txt[$i]); if ($o < 128) { // 0..127: raw - $txt2 .= $txt{$i}; + $txt2 .= $txt[$i]; } else { $o1 = 0; $o2 = 0; $o3 = 0; - if ($i < strlen($txt) - 1) $o1 = ord($txt{$i + 1}); - if ($i < strlen($txt) - 2) $o2 = ord($txt{$i + 2}); - if ($i < strlen($txt) - 3) $o3 = ord($txt{$i + 3}); + if ($i < strlen($txt) - 1) $o1 = ord($txt[$i + 1]); + if ($i < strlen($txt) - 2) $o2 = ord($txt[$i + 2]); + if ($i < strlen($txt) - 3) $o3 = ord($txt[$i + 3]); $hexval = 0; if ($o >= 0xc0 && $o < 0xc2) { // INVALID --- should never occur: 2-byte UTF-8 although value < 128