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

fix #1630 없는 사용자 정의 값에 접근시 발생할 수 있는 문제 수정 #1634

Merged
3 commits merged into from
Jul 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions modules/document/document.item.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,14 @@ function getExtraVars()
function getExtraValue($idx)
{
$extra_vars = $this->getExtraVars();
return $extra_vars[$idx]->getValue();
if(is_array($extra_vars) && array_key_exists($idx,$extra_vars))
{
return $extra_vars[$idx]->getValue();
}
else
{
return '';
}
}

function getExtraValueHTML($idx)
Expand Down Expand Up @@ -679,7 +686,15 @@ function getExtraEidValue($eid)
$extra_eid[$key->eid] = $key;
}
}
return $extra_eid[$eid]->getValue();

if(is_array($extra_eid) && array_key_exists($eid,$extra_eid))
{
return $extra_eid[$eid]->getValue();
}
else
{
return '';
}
}

function getExtraEidValueHTML($eid)
Expand All @@ -690,7 +705,15 @@ function getExtraEidValueHTML($eid)
{
$extra_eid[$key->eid] = $key;
}
return $extra_eid[$eid]->getValueHTML();

if(is_array($extra_eid) && array_key_exists($eid,$extra_eid))
{
return $extra_eid[$eid]->getValueHTML();
}
else
{
return '';
}
}

function getExtraVarsValue($key)
Expand Down