채택완료

LMS전송용 라이브러리 icode.lms.lib.php $rsvTime오류가 있습니다.

icode LMS전송의 예약전송을 할 경우, icode.lms.lib.php 파일에서 $rsvTime오류가 있군요.

아래와 같이 수정후 예약전송 정상처리 됩니다.

 

■ 수정전:

Copy
/**
* 예약날짜의 값이 정확한 값인지 확인합니다.
*
* @param        string    strDate (예약시간)
* @return        처리결과입니다
*/
function CheckCommonTypeDate($strDate) {
    $strDate = preg_replace("/[^0-9]/", "", $strDate);
    if ($strDate){
        if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($rsvTime,0,4)))
        return "예약날짜오류";
        if (substr($strDate,8,2)>23 || substr($strDate,10,2)>59) return false;
        return "예약날짜오류";
    }
}

 

수정부분:

if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($rsvTime,0,4)))

==> if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($strDate,0,4)))

 

 

★ 수정후:

Copy
/**
* 예약날짜의 값이 정확한 값인지 확인합니다.
*
* @param        string    strDate (예약시간)
* @return        처리결과입니다
*/
function CheckCommonTypeDate($strDate) {
    $strDate = preg_replace("/[^0-9]/", "", $strDate);
    if ($strDate){
        if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($strDate,0,4)))
        return "예약날짜오류";
        if (substr($strDate,8,2)>23 || substr($strDate,10,2)>59) return false;
        return "예약날짜오류";
    }
}

사용하실 분 계시면 참조 하셔요.

 

답변 2개 / 댓글 2개

채택된 답변
+20 포인트

버그 게시판에도 제보하시면 좋을거 같습니다.

답변에 대한 댓글 1개

네.
버그신고에 올렸습니다.
조언 감사합니다.

오류확인된 그누보드 버전이 무엇인가요?

그누보드 5.5.8.2.1 에서는 오류가 확인되지 않네요

답변에 대한 댓글 1개

그누보드(영카트) 5.5.8 에서 수정이 되었네요.
5.5.8이전 버전에서 사용 할 경우는 수정이 필요할 것 같습니다.

답변을 작성하려면 로그인이 필요합니다.