diff options
author | long <long@testmybrain.org> | 2010-07-07 01:40:22 +0800 |
---|---|---|
committer | lillialexis <lillialexis@gmail.com> | 2010-07-20 03:09:38 +0800 |
commit | b643228707f6ec4c793c82bd8f152ab31a4e0e23 (patch) | |
tree | 8052846607193c1dc32651640066f32ea55910b1 | |
parent | 7b56917d15616604de2711e57033221fd5e9e954 (diff) | |
download | php-openid-b643228707f6ec4c793c82bd8f152ab31a4e0e23.zip php-openid-b643228707f6ec4c793c82bd8f152ab31a4e0e23.tar.gz php-openid-b643228707f6ec4c793c82bd8f152ab31a4e0e23.tar.bz2 |
Fixed warnings in try_auth.php, consumer.php. Fixed reference to openid-enabled.com in detect.php
-rw-r--r-- | examples/consumer/common.php | 6 | ||||
-rw-r--r-- | examples/consumer/try_auth.php | 5 | ||||
-rw-r--r-- | examples/detect.php | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/examples/consumer/common.php b/examples/consumer/common.php index 5e63fce..67f4273 100644 --- a/examples/consumer/common.php +++ b/examples/consumer/common.php @@ -58,8 +58,9 @@ function &getStore() { " Please check the effective permissions."; exit(0); } + $r = new Auth_OpenID_FileStore($store_path); - return new Auth_OpenID_FileStore($store_path); + return $r; } function &getConsumer() { @@ -68,7 +69,8 @@ function &getConsumer() { * earlier. */ $store = getStore(); - return new Auth_OpenID_Consumer($store); + $r = new Auth_OpenID_Consumer($store); + return $r; } function getScheme() { diff --git a/examples/consumer/try_auth.php b/examples/consumer/try_auth.php index 7efec76..4873140 100644 --- a/examples/consumer/try_auth.php +++ b/examples/consumer/try_auth.php @@ -37,7 +37,10 @@ function run() { $auth_request->addExtension($sreg_request); } - $policy_uris = $_GET['policies']; + $policy_uris = null; + if (isset($_GET['policies'])) { + $policy_uris = $_GET['policies']; + } $pape_request = new Auth_OpenID_PAPE_Request($policy_uris); if ($pape_request) { diff --git a/examples/detect.php b/examples/detect.php index 55fcaa8..123e496 100644 --- a/examples/detect.php +++ b/examples/detect.php @@ -434,8 +434,8 @@ function detect_fetcher($r, &$out) $ok = true; $fetcher = Auth_Yadis_Yadis::getHTTPFetcher(); - $fetch_url = 'http://www.openidenabled.com/resources/php-fetch-test'; - $expected_url = $fetch_url . '.txt'; + $fetch_url = 'http://gist.github.com/raw/465630/c57eff55ebc0c54973903af5f72bac72762cf4f4/helloworld'; + $expected_url = $fetch_url;// . '.txt'; $result = $fetcher->get($fetch_url); if (isset($result)) { |