'formatting.php'에 해당되는 글 1건

PHP 7.2, 7.4 버전에서 멀쩡하던게 8.1, 8.2 버전에서 오류가 발생하네요~

 

AH01071: Got error 'PHP message: PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /home/example/www/_wp_/wp-includes/script-loader.php on line 757'

AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/example/www/_wp_/wp-includes/load.php:926

 

/wp-includes/script-loader.php
        foreach ( $tinymce_settings as $key => $value ) {
                if ( is_bool( $value ) ) {
                        $val       = $value ? 'true' : 'false';
                        $init_obj .= $key . ':' . $val . ',';
                        continue;
                } elseif ( ! empty( $value ) && is_string( $value ) && (
                        ( '{' == $value{0} && '}' == $value{strlen( $value ) - 1} ) ||
                        ( '[' == $value{0} && ']' == $value{strlen( $value ) - 1} ) ||
                        preg_match( '/^\(?function ?\(/', $value ) ) ) {
                        $init_obj .= $key . ':' . $value . ',';
                        continue;
                }
                $init_obj .= $key . ':"' . $value . '",';
        }

위에서 {} 중괄호 이부분을 [] 대괄호로 변경합니다.

                        ( '{' == $value[0] && '}' == $value[strlen( $value ) - 1] ) ||
                        ( '[' == $value[0] && ']' == $value[strlen( $value ) - 1] ) ||

그리고 이번엔 get_magic_quotes_gpc 에러인데 8.0 버전 부터 이 함수가 없어졌다는군요 ㅋ

/wp-includes/load.php
/wp-includes/formatting.php
        if ( get_magic_quotes_gpc() ) {
        }
=>
        if ( function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() ) {
        }

Warning 부분은 제외 하고 일단 3개의 파일을 수정하니 작동을 합니다.

 

그래도 워드프레스는 당분간 PHP 7.x 버전을 사용하는게 좋아보입니다.

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,