summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2013-05-15 13:11:29 -0400
committerspiderr <spider@viovio.com>2013-05-15 13:11:29 -0400
commit1d24bfc641201dacb5ab48ac2e73a65d51b66214 (patch)
tree269548e6d15d60c1fbcb73a657f62fad41ffa57d
parent7e8d9be85d88d70b7f6ec1d042265e1fcf4a80f3 (diff)
downloadutil-1d24bfc641201dacb5ab48ac2e73a65d51b66214.tar.gz
util-1d24bfc641201dacb5ab48ac2e73a65d51b66214.tar.bz2
util-1d24bfc641201dacb5ab48ac2e73a65d51b66214.zip
empty check in phpSniff
-rw-r--r--phpsniff/phpSniff.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpsniff/phpSniff.class.php b/phpsniff/phpSniff.class.php
index 7e950c4..3279592 100644
--- a/phpsniff/phpSniff.class.php
+++ b/phpsniff/phpSniff.class.php
@@ -870,7 +870,7 @@ class phpSniff
}
// if this is a mozilla browser, get the rv: information
if($this->browser_is($this->_get_short_name('mozilla'))) {
- if(preg_match('/([0-9]+)([\.0-9]+)([a-z0-9+]?)/i',$mozv[1],$match)) {
+ if( !empty( $mozv[1] ) && preg_match('/([0-9]+)([\.0-9]+)([a-z0-9+]?)/i',$mozv[1],$match) ) {
$this->_set_browser('version',$mozv[1]);
$this->_set_browser('maj_ver',$match[1]);
$this->_set_browser('min_ver',$match[2]);
@@ -905,4 +905,4 @@ class phpSniff
{ $this->_quirks[strtolower($k)] = true;
}
}
-?> \ No newline at end of file
+?>