From d7ef0b964bbaf731c5f1d02db330a97642c1712f Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Sun, 19 May 2002 06:13:07 +0000 Subject: [PATCH] * take uname as optional constructor parameter --- pear/OS/Guess.php | 6 ++++-- 1 file 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); -- 2.50.1