diff options
author | Shein Alexey <confik@gmail.com> | 2010-06-25 19:43:12 +0800 |
---|---|---|
committer | lillialexis <lillialexis@gmail.com> | 2010-07-20 02:59:55 +0800 |
commit | acd70c0eb6d022cb124c3400094ccaada0c3e718 (patch) | |
tree | 0a82eaf04a684865c02216f690ddc2e898bb1efd | |
parent | f1e22e150674e2e6e08f7b9d4d2ef5cbdcb394a6 (diff) | |
download | php-openid-acd70c0eb6d022cb124c3400094ccaada0c3e718.zip php-openid-acd70c0eb6d022cb124c3400094ccaada0c3e718.tar.gz php-openid-acd70c0eb6d022cb124c3400094ccaada0c3e718.tar.bz2 |
1. Added dl() existance checking.
2. Fixed a notice with absent $_GET parameter.
-rw-r--r-- | examples/detect.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/detect.php b/examples/detect.php index 947fe4c..55fcaa8 100644 --- a/examples/detect.php +++ b/examples/detect.php @@ -314,7 +314,7 @@ function detect_stores($r, &$out) $found = array(); foreach (array('sqlite', 'mysql', 'pgsql') as $dbext) { - if (extension_loaded($dbext) || @dl($dbext . '.' . PHP_SHLIB_SUFFIX)) { + if (extension_loaded($dbext) || (ini_get('enable_dl') && dl($dbext . '.' . PHP_SHLIB_SUFFIX))) { $found[] = $dbext; } } @@ -401,15 +401,15 @@ function detect_query_corruption($r, &$out) if ($_SERVER["QUERY_STRING"]!="test_query=a%26b") { $out.=$r->p("Your web server seems to corrupt queries. Received ".$_SERVER["QUERY_STRING"].", expected a=%26b. Check for mod_encoding."); - return false; + return false; } else { $out.=$r->p("Your web server does not corrupt queries. Good."); - return true; + return true; } } - + function detect_fetcher($r, &$out) { $out .= $r->h2('HTTP Fetching'); @@ -483,11 +483,11 @@ function detect_fetcher($r, &$out) } header('Content-Type: ' . $r->contentType() . '; charset=us-ascii'); -if (!$_GET["test_query"]) +if (empty($_GET["test_query"])) { header("Location: ".$_SERVER['PHP_SELF']."?test_query=a%26b"); } - + $title = 'OpenID Library Support Report'; $out = $r->start($title) . $r->h1($title) . |