issue:17149595

PHP6에서 magic_quotes_gpc 함수 사용안하도록 수정 


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4472 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2008-08-29 06:25:19 +00:00
parent 1eee3363e5
commit 59c72699d4
8 changed files with 12 additions and 9 deletions

View file

@ -108,7 +108,7 @@
* @brief 쿼리에서 입력되는 문자열 변수들의 quotation 조절
**/
function addQuotes($string) {
if(get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $string = stripslashes(str_replace("\\","\\\\",$string));
if(!is_numeric($string)) $string = @pg_escape_string($string);
return $string;
}