From 5459701254d951eff2e46250deb76b9504a07fb8 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 21 Jan 2014 16:49:35 -0200 Subject: [PATCH] Replace regex by explode as suggested by Ermal --- etc/inc/pfsense-utils.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 1c4936ce2f..90e2743fe9 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1628,7 +1628,8 @@ function isvm() { } function get_freebsd_version() { - return preg_replace('/\..*$/', '', php_uname("r")); + $version = explode(".", php_uname("r")); + return $version[0]; } function download_file($url, $destination, $verify_ssl = false, $connect_timeout = 60, $timeout = 0) {