diff --git a/include/admin/Menu.php b/include/admin/Menu.php index 73b9952..69cb2c5 100644 --- a/include/admin/Menu.php +++ b/include/admin/Menu.php @@ -177,7 +177,7 @@ class Menu extends \gp\special\Base{ return; } - $gp_menu_collapse = substr($gp_menu_collapse, $pos + strlen($search)); + $gp_menu_collapse = substr($gp_menu_collapse, intval($pos) + intval(strlen($search))); $pos = strpos($gp_menu_collapse, ']'); if( $pos === false ){ return; diff --git a/include/thirdparty/ScssPhp/ScssPhp/Parser.php b/include/thirdparty/ScssPhp/ScssPhp/Parser.php index 7b47f15..8c2ee75 100644 --- a/include/thirdparty/ScssPhp/ScssPhp/Parser.php +++ b/include/thirdparty/ScssPhp/ScssPhp/Parser.php @@ -1146,7 +1146,7 @@ class Parser } $r = '/' . $regex . '/' . $this->patternModifiers; - $result = preg_match($r, $this->buffer, $out, null, $from); + $result = preg_match($r, $this->buffer, $out, 0 , $from); return $result; } @@ -1389,7 +1389,7 @@ class Parser { $r = '/' . $regex . '/' . $this->patternModifiers; - if (! preg_match($r, $this->buffer, $out, null, $this->count)) { + if (! preg_match($r, $this->buffer, $out, 0 , $this->count)) { return false; } @@ -1470,7 +1470,7 @@ class Parser { $gotWhite = false; - while (preg_match(static::$whitePattern, $this->buffer, $m, null, $this->count)) { + while (preg_match(static::$whitePattern, $this->buffer, $m, 0, $this->count)) { if (isset($m[1]) && empty($this->commentsSeen[$this->count])) { // comment that are kept in the output CSS $comment = []; @@ -3217,7 +3217,7 @@ class Parser } // match comment hack - if (preg_match(static::$whitePattern, $this->buffer, $m, null, $this->count)) { + if (preg_match(static::$whitePattern, $this->buffer, $m, 0 , $this->count)) { if (! empty($m[0])) { $parts[] = $m[0]; $this->count += \strlen($m[0]); diff --git a/include/thirdparty/cssmin_v.1.0.php b/include/thirdparty/cssmin_v.1.0.php index 0f240e9..e7481bf 100644 --- a/include/thirdparty/cssmin_v.1.0.php +++ b/include/thirdparty/cssmin_v.1.0.php @@ -40,7 +40,7 @@ class cssmin $search = array("/\\;\s/", "/\s*\{\\s*/", "/\\:\s+\\#/", "/,\s+/i", "/\\:\s+\\\'/i", "/\\:\s+([0-9A-Z\-]+)/i"); $replace = array(";", "{", ":#", ",", ":\'", ":$1"); $v = preg_replace($search, $replace, $v); - $v = str_replace("\n", null, $v); + $v = str_replace("\n", "" , $v); return $v; } }