Всем привет!Сервер,error log сыпет ошибками относительно компонента sppagebuilder,разработчик на вопросы не отвечает,так как с php на ВЫ ищу помощи здесь,как побороть эти ошибки?Буду признателен любой помощи,спасибо! Кусок лога,вернее два Код (Text): [error] 17916#17916: *12766 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined property: stdClass::$section_height_option in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/layouts/row/css.php on line 32PHP PHP Notice: Uninitialized string offset: 11 in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/helpers/css-parser.php on line 110PHP [error] 17916#17916: *12766 FastCGI sent in stderr: "Uninitialized string offset: 48 in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/helpers/css-parser.php on line 110PHP PHP Notice: Uninitialized string offset: 58 in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/helpers/css-parser.php on line 110PHP Так же два фрагмента кода:1-css.php. Код (Text): $row_styles = ''; $style =''; $style_sm =''; $style_xs =''; if(isset($options->section_height)){ if(is_object($options->section_height)){ if(isset($options->section_height->md) && $options->section_height->md){ if($options->section_height_option=='height'){ $style .= 'height:'.$options->section_height->md.'px;'; } } if (isset($options->section_height->sm) && $options->section_height->sm){ if($options->section_height_option=='height'){ $style_sm .= 'height:'.$options->section_height->sm.'px;'; } } if (isset($options->section_height->xs) && $options->section_height->xs){ if($options->section_height_option=='height'){ $style_xs .= 'height:'.$options->section_height->xs.'px;'; } } } else { if ($options->section_height) { if($options->section_height_option=='height'){ $style .= 'height:'.$options->section_height.'px;'; } } } } 2-css-parser.php Код (Text): $css = preg_replace('/\/\*.*\*\//Us', '', $css); while(preg_match('/^\s*(\@(media|import|local)([^\{\}]+)(\{)|([^\{\}]+)(\{)|([^\{\}]*)(\}))/Usi', $css, $match)) { if(isset($match[8]) && ($match[8] == '}')) { if($section !== false) { $code = trim($match[7]); $idx = 0; $inQuote = false; $property = false; $codeLen = strlen($code); $parenthesis = array(); while($idx < $codeLen) { if($code == null){ break; } $c = $code{$idx}; $idx++; if($inQuote !== false) { if($inQuote === $c) { $inQuote = false; } } elseif(($inQuote === false) && ($c == '(')) { array_push($parenthesis, '('); } elseif(($inQuote === false) && ($c == ')')) { array_pop($parenthesis); } elseif(($c == '\'') || ($c == '"')) { $inQuote = $c; } elseif(($property === false) && ($c == ':')) { $property = trim(substr($code, 0, $idx - 1)); if(preg_match('/^(.*)\[([0-9]*)\]$/Us', $property, $propMatch)) { $property = $propMatch[1].'['.static::$propCounter.']'; static::$propCounter += 1; } $code = substr($code, $idx); $idx = 0; } elseif((count((array) $parenthesis) == 0) && ($c == ';')) { $value = trim(substr($code, 0, $idx - 1)); $code = substr($code, $idx); $idx = 0; $this->AddProperty($currentMedia, $section, $property, $value); $property = false; }
А вы лог внимательно посмотрели? Там говорится о css-parser.php, а вы какие то левые файлы предоставили Находите файл, находите строку 110 и ее внимательно изучаете, или выкладывание сюда кусок с 100 по 120 строку, указав какая же из строк 110... Мы же не телепаты
Дык я и выложил css-parser.php,это второй фрагмент,в горячке не указал строку,сори.110 строка здесь начинается с 16 строки- Код (Text): $c = $code{$idx};
Заменил на скобки,к сожалению лог все тот же.. Код (Text): 2020/04/06 21:40:53 [error] 25045#25045: *13255 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined property: stdClass::$section_height_option in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/layouts/row/css.php on line 32PHP message 2020/04/06 21:40:54 [error] 25045#25045: *13255 FastCGI sent in stderr: "Uninitialized string offset: 48 in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/helpers/css-parser.php on line 110PHP message: PHP Notice: Uninitialized string offset:
Не совсем понял,на какую приблуду?https://www.joomshaper.com/page-builder --- Добавлено --- Ошибку в css-parser.php победили заменой Код (Text): $c = $code{$idx}; на Код (Text): $c = isset($code{$idx}) ? $code{$idx} : ''; Остается вопрос по css.php.,свежий лог Код (Text): 09:28:50 [error] 964#964: *414 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined property: stdClass::$section_height_option in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/layouts/row/css.php on line 32PHP message: PHP Notice: Undefined property: stdClass::$section_height_option in /home/xxxxx/web/mysite.com/public_html/components/com_sppagebuilder/layouts/row/css.php on line 32PHP message: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/xxxxx/web/mysite.com/public_html/plugins/system/helixultimate/core/classes/Minifier.php on line 226" while reading response header from upstream, client: 54.37.73.108, server: mysite.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm-mysite.com.sock:", host: "mysite.com"