diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index c11781322..541f3febb 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -489,12 +489,12 @@ if($key == "page" || $key == "cpage" || substr($key,-3)=="srl") $val = (int)$val; else if(is_array($val) && count($val) ) { foreach($val as $k => $v) { - if(get_magic_quotes_gpc()) $v = stripslashes($v); + if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $v = stripslashes($v); $v = trim($v); $val[$k] = $v; } } else { - if(get_magic_quotes_gpc()) $val = stripslashes($val); + if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) $val = stripslashes($val); $val = trim($val); } diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index 9cb54fabf..c27d6858f 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -102,7 +102,7 @@ **/ function addQuotes($string) { if(!$this->fd) return $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 = str_replace("'","''",$string); return $string; } diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index d976ea482..d22f6c8b3 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -113,7 +113,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 = @mysql_escape_string($string); return $string; } diff --git a/classes/db/DBMysql_innodb.class.php b/classes/db/DBMysql_innodb.class.php index 53c49960c..5e2b09e8a 100644 --- a/classes/db/DBMysql_innodb.class.php +++ b/classes/db/DBMysql_innodb.class.php @@ -114,7 +114,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 = @mysql_escape_string($string); return $string; } diff --git a/classes/db/DBPostgresql.class.php b/classes/db/DBPostgresql.class.php index 9b3b0a792..81ca1d1a0 100644 --- a/classes/db/DBPostgresql.class.php +++ b/classes/db/DBPostgresql.class.php @@ -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; } diff --git a/classes/db/DBSqlite2.class.php b/classes/db/DBSqlite2.class.php index 3825bc914..95b388df2 100644 --- a/classes/db/DBSqlite2.class.php +++ b/classes/db/DBSqlite2.class.php @@ -116,7 +116,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 = str_replace("'","''", $string); return $string; } diff --git a/classes/db/DBSqlite3_pdo.class.php b/classes/db/DBSqlite3_pdo.class.php index 3c5fe48f7..b2b9ae099 100644 --- a/classes/db/DBSqlite3_pdo.class.php +++ b/classes/db/DBSqlite3_pdo.class.php @@ -123,7 +123,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 = str_replace("'","''",$string); return $string; } diff --git a/classes/httprequest/XEHttpRequest.class.php b/classes/httprequest/XEHttpRequest.class.php index 7b39e2991..3e42e7a3f 100644 --- a/classes/httprequest/XEHttpRequest.class.php +++ b/classes/httprequest/XEHttpRequest.class.php @@ -72,7 +72,10 @@ } fclose($socket); - return array($code, $body); + $ret->result_code = $code; + $ret->body = $body; + + return $ret; } } ?>