본문 바로가기
카테고리 없음

[워드프레스에러유형]Warning: sprintf(): Too few arguments in /app/public/wp-admin/includes/class-bulk-upgrader-skin.php on line 153 해결책

by 시너지메이커9 2019. 9. 25.
반응형


Warning: sprintf(): Too few arguments in /app/public/wp-admin/includes/class-bulk-upgrader-skin.php on line 
153
라고 플러그인을 설치하면 나오는 경우가 있습니다.

class-bulk-upgrader-skin.php 관련 문제는 여러가지가 있습니다. 버전별로 소스도 달라지고 암튼 로컬에서 설치할때는 거의 뿜습니다. 자동업데이트 등 기타 원인이나 왜 그런지 생각하지 마시고 그냥 스크립트를 약간 바꿔주시면 됩니다.

/wp-admin/includes/class-bulk-upgrader-skin.php 파일에서 141줄에서 159줄까지를

if ( $this->result && ! is_wp_error( $this->result ) ) {
	if ( ! $this->error ) {
		echo '<div class="updated js-update-details" data-update-details="progress-' . esc_attr( $this->upgrader->update_current ) . '">' .
			'<p>' . sprintf( $this->upgrader->strings['skin_update_successful'], $title ) .
			' <button type="button" class="hide-if-no-js button-link js-update-details-toggle" aria-expanded="false">' . __( 'Show details.' ) . '</button>' .
			'</p></div>';
	}

	echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
}


아래처럼 바꿔주시면 됩니다.

if ( $this->result && ! is_wp_error( $this->result ) ) {
	if ( ! $this->error )
		echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
	echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
}

 

반응형