Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit d250ab0

Browse files
committed
bug fixed for env tool.
1 parent 890e699 commit d250ab0

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
composer.lock
66
*.swp
77
*.patch
8+
.DS_Store

src/env/Client.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,34 +259,34 @@ protected function _userAgentCheck()
259259
$os = 'Windows other';
260260
}
261261

262-
} elseif (strpos('linux', $agent)) {
262+
} elseif (strpos($agent, 'linux')) {
263263

264-
if (strpos('android', $agent)) {
264+
if (strpos($agent, 'android')) {
265265
$os = 'Android';
266266
$this->set('isAndroid', true);
267267
} else {
268268
$os = 'Linux';
269269
$this->set('isLinux', true);
270270
}
271271

272-
} elseif (strpos('android', $agent)) {
272+
} elseif (strpos($agent, 'android')) {
273273
$os = 'Android';
274274
$this->set('isAndroid', true);
275-
} elseif ( strpos($agent,"iphone") ) {
275+
} elseif ( strpos($agent,'iphone') ) {
276276
$os = 'Ios';
277277
$this->set('isIos', true);
278-
} elseif (strpos('ubuntu', $agent)) {
278+
} elseif (strpos($agent, 'ubuntu')) {
279279
$os = 'Ubuntu';
280280
$this->set('isLinux', true);
281-
} elseif (strpos('mac', $agent)) {
281+
} elseif (strpos($agent, 'mac')) {
282282
$os = 'Mac OS X';
283283
$this->set('isMac', true);
284-
} elseif (strpos('unix', $agent)) {
284+
} elseif (strpos($agent, 'unix')) {
285285
$os = 'Unix';
286286
$this->set('isUnix', true);
287-
} elseif (strpos('bsd', $agent)) {
287+
} elseif (strpos($agent, 'bsd')) {
288288
$os = 'BSD';
289-
} elseif (strpos('symbian', $agent)) {
289+
} elseif (strpos($agent, 'symbian')) {
290290
$os = 'SymbianOS';
291291
} else {
292292
$os = 'Unknown';

src/env/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Environment extends StdBase
2525

2626
public static function make(Server $server=null, Client $client=null)
2727
{
28-
return static($server, $client);
28+
return new static($server, $client);
2929
}
3030

3131
public function __construct(Server $server=null, Client $client=null)

0 commit comments

Comments
 (0)