OSDN Git Service

array_key_exists() => isset()
authorhenoheno <henoheno>
Thu, 7 Oct 2004 13:25:41 +0000 (22:25 +0900)
committerhenoheno <henoheno>
Thu, 7 Oct 2004 13:25:41 +0000 (22:25 +0900)
lib/auth.php

index 93d68ba..7f3d535 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: auth.php,v 1.2 2004/10/07 13:02:48 henoheno Exp $
+// $Id: auth.php,v 1.3 2004/10/07 13:25:41 henoheno Exp $
 //
 
 // ÊÔ½¸ÉÔ²Äǽ¤Ê¥Ú¡¼¥¸¤òÊÔ½¸¤·¤è¤¦¤È¤·¤¿¤È¤­
@@ -93,7 +93,7 @@ function basic_auth($page, $auth_flag, $exit_flag, $auth_pages, $title_cannot)
        // ¥æ¡¼¥¶¥ê¥¹¥È¤Ë´Þ¤Þ¤ì¤ë¤¤¤º¤ì¤«¤Î¥æ¡¼¥¶¤Èǧ¾Ú¤µ¤ì¤ì¤ÐOK
        if (! isset($_SERVER['PHP_AUTH_USER'])
                || ! in_array($_SERVER['PHP_AUTH_USER'], $user_list)
-               || ! array_key_exists($_SERVER['PHP_AUTH_USER'], $auth_users)
+               || ! isset($_SERVER['PHP_AUTH_USER'], $auth_users)
                || $auth_users[$_SERVER['PHP_AUTH_USER']] != $_SERVER['PHP_AUTH_PW'])
        {
                if ($auth_flag) {