메뉴 생성시 Count() 관련 문제가 발생합니다 아라후 2020.12.19 14:24 431 0 6 CMS/프레임워크 Rhymix 1.9 개발 언어 PHP 7.4 count -> countobj 관련 문제가 발생하는것 같습니다. 코어에도 반영이 되면 좋을것 같아 공유합니다!
댓글 6
제보 감사합니다. 광속패치 출동합니다.
https://github.com/rhymix/rhymix/commit/2c48e34
위젯 부분에도 발생하여 보고드립니당
{
// Language in bringing
$lang_list = Context::get('lang_supported');
// Bringing widget cache sequence
preg_match_all('!<img([^\>]*)widget=([^\>]*?)\>!is', $content, $matches);
$oXmlParser = new XeXmlParser();
$cnt = count($matches[1]);
for($i=0;$i<$cnt;$i++)
{
$buff = $matches[0][$i];
$xml_doc = $oXmlParser->parse(trim($buff));
$args = $xml_doc->img->attrs;
if(!$args) continue;
// If you are not caching path
$widget = $args->widget;
$sequence = $args->widget_sequence;
$cache = $args->widget_cache;
if(!$cache) continue;
if(!$sequence)
{
$sequence = sha1(json_encode($args));
}
if(countobj($args))
{
foreach($args as $k => $v) $args->{$k} = urldecode($v);
}
foreach($lang_list as $lang_type => $val)
{
$this->getCache($widget, $args, $lang_type, true, $sequence);
}
}
}
{
foreach($args as $k => $v) $args->{$k} = urldecode($v);
}
이 부분이 count로 되어있어 오류가 발생하였고, countobj로 바꾸니까 해결되었습니다
패치: https://github.com/rhymix/rhymix/commit/2f99d71
그렇게 전달드리겠습니다~