CMS솔루션마켓, 이온디 - 워드프레스, 라이믹스, 카페24, 그누보드, 엑셀

홈페이지 제작팁

# 등업관리모듈
## Version History
- 1.1.0 (2023-06-27)
- 1.0.0 (2015-07-30)
# Buglist
수정내역
- new Object 를 new BaseObject로 수정함
- function gradeupModel::getMemberInfo() 오류 수정
- function gradeupModel::gradeUp() 오류 수정
- 
## E1
new Object -> new BaseObject


## e2
```
ArgumentCountError #0 "Too few arguments to function gradeupModel::getMemberInfo(), 2 passed in /var/www/vhosts/eond.com/demo.eond.com/darknight/modules/gradeup/gradeup.view.php on line 66 and exactly 3 expected" in modules/gradeup/gradeup.model.php on line 105
```
$module_config->gradeup_condition[$val->title]['lv'] = $oGradeupModel->getMemberInfo('lv',$logged_info->member_srl);

function getMemberinfo 변수가 3개 필요한데 저기에서는 2개만 입력되어져있어서 오류가 발생함.
> ,$check_date 추가함

## e3
```
ArgumentCountError #0 "Too few arguments to function gradeupModel::getMemberInfo(), 2 passed in /var/www/vhosts/eond.com/demo.eond.com/darknight/modules/gradeup/gradeup.controller.php on line 215 and exactly 3 expected" in modules/gradeup/gradeup.model.php on line 105
```
$args->condition_lv = $oGradeupModel->getMemberInfo('lv',$logged_info->member_srl,$val['gradeup_date']);
// $val['gradeup_date'] 추가
$condition_lv = $oGradeupModel->getCheckCondition('lv', $val['gradeup_lv'], $logged_info->member_srl,$val['gradeup_date']);
// $val['gradeup_date'] 추가

## e4 승인시
```
ArgumentCountError #0 "Too few arguments to function gradeupModel::gradeUp(), 4 passed in /var/www/vhosts/eond.com/demo.eond.com/darknight/modules/gradeup/gradeup.controller.php on line 287 and exactly 5 expected" in modules/gradeup/gradeup.model.php on line 350
common/framework/debug.php:681
```
         $oGradeupModel->gradeUp('confirm', $add_type, $group_srl, $member_srl, $remain_date);


Error #0 "Call to a member function format() on bool" in widgets/login_info/skins/xe_official_darknight/login_info.html on line 26

## e5 기간제등업관리 수정시
./modules/gradeup/tpl/term_group_modify.html
등업만료일 {zdate($info->remain_date,'Ymd',false)}

zdate를 아래 코드로 변경함

{@
$remaindate = DateTime::createFromFormat('Y-m-dHi', $info->remain_date)->format('Ymd');
}

### [문제확인중] e6. 기간 만료가 되어도 회원이 기존 등급으로 내려가지 않음 (2023-06-08)
### [기능개선필요] e7. 등업 추가시 회원 번호가 아닌, 회원검색기능+회원아이디로 추가기능이 필요함. (2023-06-08)
dispGradeupAdminTermGroupAdd
modules/gradeup/tpl/term_group_add.html
### [버그수정필요함] e8. 기간등업-회원추가후-수정 누르면 오류 발생함.(2023-06-08)
```
[08-Jun-2023 10:50:44 Etc/GMT-9] PHP Exception: Error #0 "Call to a member function format() on bool" in modules/gradeup/tpl/term_group_modify.html on line 57
#0 /var/www/vhosts/eond.com/httpdocs/classes/template/TemplateHandler.class.php(424): include()
#1 /var/www/vhosts/eond.com/httpdocs/classes/template/TemplateHandler.class.php(189): TemplateHandler->_fetch()
#2 /var/www/vhosts/eond.com/httpdocs/classes/display/HTMLDisplayHandler.php(98): TemplateHandler->compile()
#3 /var/www/vhosts/eond.com/httpdocs/classes/display/DisplayHandler.class.php(82): HTMLDisplayHandler->toDoc()
#4 /var/www/vhosts/eond.com/httpdocs/classes/module/ModuleHandler.class.php(1210): DisplayHandler->printContent()
#5 /var/www/vhosts/eond.com/httpdocs/index.php(52): ModuleHandler->displayContent()
```
오류가 발생해서 아래 코드 추가후 정상적으로 수정화면으로 넘어갔음..(이유모름;)
```
$info = new stdClass();
$info->remain_date = '2023-06-081022';  // Y-m-dHi 형식에 맞게 설정
$remaindate = DateTime::createFromFormat('Y-m-dHi', $info->remain_date);

if ($remaindate === false) :
    echo "날짜 형식이 잘못되었습니다.\n";
else :
    echo $remaindate->format('Ymd') . "\n";
endif;

```
### [버그수정완료] e9. 로컬호스트에서만 회원추가가 안됨. (2023-06-08)
```
[08-Jun-2023 11:11:03 Etc/GMT-9] Query Error: SQLSTATE[HY000]: General error: 1364 Field 'new_group_srl' doesn't have a default value (code -1) in /Users/eond/PhpstormProjects/rx/modules/gradeup/gradeup.admin.controller.php on line 144
#0 /Users/eond/PhpstormProjects/rx/classes/module/ModuleObject.class.php(686): gradeupAdminController->procGradeupAdminTermGroupAdd()
```
dispGradeupAdminTermGroupAdd
modules/gradeup/tpl/term_group_add.html

### [버그] e10. 기간제회원수정에서 날짜수정이 안됨.(2023-06-08) -> 수정은 되는데 실제 수정화면에서 수정된 날짜로 변경은 안됨.

### [버그수정완료] e11. 회원등업페이지로 접속하려고 하면 오류 뜨고 안됨(2023-06-08)
```
[08-Jun-2023 10:56:52 Etc/GMT-9] PHP Exception: Error #0 "Attempt to modify property "gradeup_condition" on null" in modules/gradeup/gradeup.view.php on line 56
#0 /var/www/vhosts/eond.com/httpdocs/classes/module/ModuleObject.class.php(680): gradeupView->dispGradeupConfirmGroup()
#1 /var/www/vhosts/eond.com/httpdocs/classes/module/ModuleHandler.class.php(694): ModuleObject->proc()
#2 /var/www/vhosts/eond.com/httpdocs/index.php(52): ModuleHandler->procModule()
```
> $module_config = new stdClass(); // e11 추가함

### [버그수정완료] e12. 등업로그 화면 오류 뜸.
```
[08-Jun-2023 11:00:10 Etc/GMT-9] PHP Exception: TypeError #0 "in_array(): Argument #2 ($haystack) must be of type array, null given" in modules/gradeup/tpl/grade_log.html on line 12
#0 /var/www/vhosts/eond.com/httpdocs/files/cache/template/modules/gradeup/tpl/grade_log.html.php(12): in_array()
#1 /var/www/vhosts/eond.com/httpdocs/classes/template/TemplateHandler.class.php(424): include()
#2 /var/www/vhosts/eond.com/httpdocs/classes/template/TemplateHandler.class.php(189): TemplateHandler->_fetch()
#3 /var/www/vhosts/eond.com/httpdocs/classes/display/HTMLDisplayHandler.php(98): TemplateHandler->compile()
#4 /var/www/vhosts/eond.com/httpdocs/classes/display/DisplayHandler.class.php(82): HTMLDisplayHandler->toDoc()
#5 /var/www/vhosts/eond.com/httpdocs/classes/module/ModuleHandler.class.php(1210): DisplayHandler->printContent()
#6 /var/www/vhosts/eond.com/httpdocs/index.php(52): ModuleHandler->displayContent()
```

> 수정전 : in_array($item->module_srl, $config->use_module_srls)
> 수정후 : in_array($item->module_srl, $config->use_module_srls ?: [])
 
댓글은 로그인 사용자만 작성 가능합니다. 로그인하기