From 6293a31da86e1d6e7c55f652d52b7e7ad596fa1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no> Date: Wed, 22 Feb 2017 14:55:56 +0100 Subject: [PATCH] =?UTF-8?q?bugfix:=20Looking=20for=20=E2=80=9CWIN=E2=80=9D?= =?UTF-8?q?=20inside=20=E2=80=9CDarwin=E2=80=9D=20will=20give=20positive?= =?UTF-8?q?=20results.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To put it differently, to avoid OSX machines being identified as windows boxes, “darwin” should be evaluated *before* “win”. --- lib/SimpleSAML/Utils/System.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/SimpleSAML/Utils/System.php b/lib/SimpleSAML/Utils/System.php index 61e6bfe7e..689dcf08d 100644 --- a/lib/SimpleSAML/Utils/System.php +++ b/lib/SimpleSAML/Utils/System.php @@ -31,12 +31,12 @@ class System if (stristr(PHP_OS, 'LINUX')) { return self::LINUX; } - if (stristr(PHP_OS, 'WIN')) { - return self::WINDOWS; - } if (stristr(PHP_OS, 'DARWIN')) { return self::OSX; } + if (stristr(PHP_OS, 'WIN')) { + return self::WINDOWS; + } if (stristr(PHP_OS, 'BSD')) { return self::BSD; } -- GitLab