Warning: Illegal string offset ‘data-column-id’ mpc_column.php on line 101

Warning: Illegal string offset ‘data-column-id’ mpc_column.php on line…

더시민 0 1581 0

경고오류

Warning: Illegal string offset ‘data-column-id’ in …\wp-content\plugins\mpc-massive\shortcodes\mpc_column\mpc_column.php on line 101

Warning: Invalid argument supplied for foreach() in …\wp-content\plugins\mpc-massive\shortcodes\mpc_column\mpc_column.php on line 128

 

원인분석

php7 또는 이하 버전에서 저 오류 나온다고 하네요 . 근데 2017년도 버전 오류인데. 
그전까지는 mpc에서 스타일 id값을 데이터 컬럼 아이디로 사용하는 부분을 
이전에 안쓰다 새로이 썼거나 그럴거에요

101 줄에서는 $this->sh_atts[ 'data-column-id' ] = $this->css_id;
sh_atts가 배열인데

164줄 선언에서는
      $this->sh_atts = ''; 
그냥 변수로 선언해서 .
이걸 배열로 바꿔준거에요
배열로 사용할 것인데 최초 선언을 변수로 선언해준 오류.
암튼 css_id 부분의 값이 입력되면서 이전에는 체크안할 부분을 체크하면서 배열인데 변수라고 선언해서 생긴 오류니
css 수정하신거 때문에 출력된거같네요

 

 

/wp-content/plugins/mpc-massive/shortcodes/mpc_column/mpc_column.php

 

에서 function reset() 에서

function reset() { $this->css_id = ''; $this->classes = ''; $this->sh_atts = ''; $this->atts = $this->defaults; libxml_clear_errors(); }

이부분을

function reset() { $this->css_id = ''; $this->classes = ''; $this->sh_atts = array(); $this->atts = $this->defaults; libxml_clear_errors(); }

로 수정해준다.

 

 

https://www.8theme.com/topic/massive-addons-for-visual-composer-v2-1-illegal-string-offset-data-column-id/

0 Comments
제목
Category
Facebook Twitter GooglePlus KakaoStory KakaoTalk NaverBand