Skip to content

Commit

Permalink
Merge pull request #2 from maarekj/patch-1
Browse files Browse the repository at this point in the history
FIX notice in UserAgentService.php
  • Loading branch information
andres-montanez committed Jul 1, 2015
2 parents f2c7a2c + 4dd5b54 commit ac26ac2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Service/UserAgentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public function parse($userAgentString)
}

// Detect Operating System by Regular Expression
$osId = null;
if (!$osFound) {
foreach ($this->data['operating_systems_reg'] as $operatingSystemRegEx) {
if (@preg_match($operatingSystemRegEx['regstring'], $userAgentString)) {
Expand All @@ -142,7 +143,7 @@ public function parse($userAgentString)
}

// A valid Operating System was found
if ($osId) {
if ($osId !== null) {
$osData = $this->data['operating_systems'][$osId];

$userAgent->setOperatingSystemFamily($osData['family']);
Expand Down

0 comments on commit ac26ac2

Please sign in to comment.