diff --git a/html/inc/util_ops.inc b/html/inc/util_ops.inc index a6f81e7db3..c6317c6261 100644 --- a/html/inc/util_ops.inc +++ b/html/inc/util_ops.inc @@ -24,9 +24,7 @@ define("BODY_COLOR", " bgcolor=ffffff "); define("NOLOGIN", "Not logged in. Click here to login.\n"); function boinc_real_escape_string($unstripped) { - if (1) { - // valid for PHP>=4.3.0, 5. If there is a run-time php_version() function please use it - // instead of this hack! + if (version_compare(phpversion(),"4.3.0")>=0) { return mysql_real_escape_string($unstripped); } else { return str_replace("\'", "'", str_replace("\\\"", "'", $unstripped));