diff options
| author | Stig Bakken <ssb@php.net> | 2002-05-19 06:13:07 +0000 |
|---|---|---|
| committer | Stig Bakken <ssb@php.net> | 2002-05-19 06:13:07 +0000 |
| commit | d7ef0b964bbaf731c5f1d02db330a97642c1712f (patch) | |
| tree | 7a36c38452cee2ce78c2b9c5d507e0bda87fe300 | |
| parent | 8d6ee9ae84658eb4e92d88c29365a91a3da2c005 (diff) | |
| download | php-git-d7ef0b964bbaf731c5f1d02db330a97642c1712f.tar.gz | |
* take uname as optional constructor parameter
| -rw-r--r-- | pear/OS/Guess.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pear/OS/Guess.php b/pear/OS/Guess.php index a98f41df69..78a7a96281 100644 --- a/pear/OS/Guess.php +++ b/pear/OS/Guess.php @@ -79,7 +79,7 @@ class OS_Guess var $release; var $extra; - function OS_Guess() + function OS_Guess($uname = null) { static $sysmap = array( 'HP-UX' => 'hpux', @@ -90,7 +90,9 @@ class OS_Guess 'i586' => 'i386', 'i686' => 'i386', ); - $uname = php_uname(); + if ($uname === null) { + $uname = php_uname(); + } $parts = preg_split('/\s+/', trim($uname)); $n = count($parts); |
