diff options
| author | spiderr <spider@viovio.com> | 2013-05-15 13:11:29 -0400 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2013-05-15 13:11:29 -0400 |
| commit | 1d24bfc641201dacb5ab48ac2e73a65d51b66214 (patch) | |
| tree | 269548e6d15d60c1fbcb73a657f62fad41ffa57d | |
| parent | 7e8d9be85d88d70b7f6ec1d042265e1fcf4a80f3 (diff) | |
| download | util-1d24bfc641201dacb5ab48ac2e73a65d51b66214.tar.gz util-1d24bfc641201dacb5ab48ac2e73a65d51b66214.tar.bz2 util-1d24bfc641201dacb5ab48ac2e73a65d51b66214.zip | |
empty check in phpSniff
| -rw-r--r-- | phpsniff/phpSniff.class.php | 4 |
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 +?>
|
