Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compileWidgetStyle 시 Warning: Undefined property: stdClass:: 이슈 #2341

Closed
BOBODDO opened this issue May 4, 2024 · 3 comments
Closed
Labels
bug 버그로 확인된 사항 patch available 패치 있음 표시 (bug와 함께 사용)

Comments

@BOBODDO
Copy link
Contributor

BOBODDO commented May 4, 2024

위젯 스타일 중 특정 설정항목이 존재하지 않을때 (키는 존재하지만 값이 존재하지 않을때) 오류가 발생하는것 같습니다.

그래서 우선

`

	if(countobj($widgetstyle_extra_var_key['extra_var']))
	{
		foreach($widgetstyle_extra_var_key['extra_var'] as $key => $val)
		{
			**if (!isset($args->{$key})) {
				continue;
			}**

			$widgetstyle_extra_var->{$key} =  $args->{$key};
		}
	}

`

와 같이 수정하여 사용하고 있으나, 공유드립니다.

@BOBODDO
Copy link
Contributor Author

BOBODDO commented May 4, 2024

또한 기본 컨텐츠 위젯에서도 유사한 오류가 발생하는거 같아 공유드립니다.

`
// Sort order
if(!in_array($args->order_type, array('asc','desc'))) $args->order_type = 'asc';
// Pages
$args->page_count = (int)$args->page_count;
if(!$args->page_count) $args->page_count = 1;
// The number of displayed lists
$args->list_count = (int)$args->list_count;
if(!$args->list_count) $args->list_count = 5;
// The number of thumbnail columns
$args->cols_list_count = (int)$args->cols_list_count;
if(!$args->cols_list_count) $args->cols_list_count = 5;
// Cut the length of the title
if(!$args->subject_cut_size) $args->subject_cut_size = 0;
// Cut the length of contents
if(!$args->content_cut_size) $args->content_cut_size = 100;
// Cut the length of nickname
if(!$args->nickname_cut_size) $args->nickname_cut_size = 0;
// Display time of the latest post
if(!$args->duration_new) $args->duration_new = 12;
// How to create thumbnails
if(!$args->thumbnail_type) $args->thumbnail_type = 'crop';
// Horizontal size of thumbnails
if(!$args->thumbnail_width) $args->thumbnail_width = 100;
// Vertical size of thumbnails
if(!$args->thumbnail_height) $args->thumbnail_height = 75;

`

Undefined property: stdClass::$content_cut_size
설정하지 않은 값에 대해 php8.3 에서 오류가 발생하고 있는 것 같습니다.

@kijin kijin added bug 버그로 확인된 사항 patch available 패치 있음 표시 (bug와 함께 사용) labels May 4, 2024
@kijin
Copy link
Member

kijin commented May 4, 2024

WidgetController는 null 방어 코드 적용했습니다.

content 위젯은 당분간 무시하겠습니다. 오류가 아니라 워닝이고, 작동하지 않는 것은 아니니까요.

@BOBODDO
Copy link
Contributor Author

BOBODDO commented May 4, 2024

WidgetController는 null 방어 코드 적용했습니다.

content 위젯은 당분간 무시하겠습니다. 오류가 아니라 워닝이고, 작동하지 않는 것은 아니니까요.

넵 감사합니다!

@kijin kijin closed this as completed in 85532fa May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 버그로 확인된 사항 patch available 패치 있음 표시 (bug와 함께 사용)
Projects
None yet
Development

No branches or pull requests

2 participants