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
의미없는 '@' 제거, 중복 연산 일부 제거 등 #737
Conversation
PHP에 존재하는 함수이고, 오류가 날 경우 캡챠가 나오지 않는다.
FileHandler::getRealPath 연산은 한번만 하면 된다.
$output = mysql_select_db($connection["db_database"], $result); | ||
if(!$output) | ||
{ | ||
exit('XE cannot select database.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exception 처리가 필요할 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어떤 exception 처리가 필요할까요?
2014년 5월 20일 화요일, sol kimnotifications@github.com님이 작성한 메시지:
In classes/db/DBMysql.class.php:
@@ -91,7 +91,11 @@ function __connect($connection)
return;
}
// select db
@mysql_select_db($connection["db_database"], $result);
$output = mysql_select_db($connection["db_database"], $result);
if(!$output)
{
exit('XE cannot select database.');
exception 처리가 필요할 것 같습니다.
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/737/files#r12839083
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://www.php.net/manual/en/function.mysql-select-db.php @ngleader
매뉴얼을 읽어보시면, 이 부분에서 오류가 날 경우 FALSE를 반환합니다. exception 처리를 했다고 볼 수 있습니다.
2014년 5월 20일 화요일, sol kimnotifications@github.com님이 작성한 메시지:
In classes/db/DBMysql.class.php:
@@ -91,7 +91,11 @@ function __connect($connection)
return;
}
// select db
@mysql_select_db($connection["db_database"], $result);
$output = mysql_select_db($connection["db_database"], $result);
if(!$output)
{
exit('XE cannot select database.');
exception 처리가 필요할 것 같습니다.
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/737/files#r12839083
.
@ngleader master 를 기반으로 pull requset를 올렸네요. 다시 올릴게요. |
파일이 존재하는지, 읽을 수 있는지 등을 확인하고서도 include 앞에 @가 붙어있거나,
코드가 잘못되지 않으면 오류가 나지 않거나, 오류가 날 경우 오히려 표시가 되는 것이 개발에 편리할 부분,
같은 연산을 중복하거나,
내장 함수로 해결될 수 있는 부분에 사용자 함수를 사용하거나
하는 등의 부분에서 수정했습니다.
대부분 누리프로젝트(누리CMS)를 하면서 검증한 내용이라 큰 문제가 없으리라 생각합니다.
반영해주세요>_< ㅋㅋㅋ