summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index 0530cde..61ec7bc 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -613,12 +613,12 @@ function pts_test_version_compatible($version_compare = "")
{
$compatible = true;
- if(!empty($version_compare) && function_exists("preg_replace"))
+ if(!empty($version_compare))
{
- $current = preg_replace("/[^0-9]/", "", PTS_VERSION);
+ $current = pts_remove_chars(PTS_VERSION, true, false, false);
$version_compare = explode("-", $version_compare);
- $support_begins = preg_replace("/[^0-9]/", "", trim($version_compare[0]));
+ $support_begins = pts_remove_chars(trim($version_compare[0]), true, false, false);
if(count($version_compare) == 2)
{
@@ -628,8 +628,7 @@ function pts_test_version_compatible($version_compare = "")
{
$support_ends = PTS_VERSION;
}
-
- $support_ends = preg_replace("/[^0-9]/", "", $support_ends);
+ $support_ends = pts_remove_chars(trim($support_ends), true, false, false);
$compatible = $current >= $support_begins && $current <= $support_ends;
}