Improves open_basedir detection
Improves open_basedir detection

fredden@gordo:/tmp/php-openid/examples$ php detect.php | grep -C1 basedir 
If you are using a filesystem-based store or SQLite, be aware that
open_basedir
<http://www.php.net/manual/en/features.safe-mode.php#ini.open-basedir> is
in effect. This means that your data will have to be stored in one of the
fredden@gordo:/tmp/php-openid/examples$ php -i | grep basedir 
open_basedir => no value => no value
fredden@gordo:/tmp/php-openid/examples$ vi detect.php 
fredden@gordo:/tmp/php-openid/examples$ php detect.php | grep basedir 
The *open_basedir* configuration restriction is not in effect.
fredden@gordo:/tmp/php-openid/examples$ git diff detect.php 
diff --git a/examples/detect.php b/examples/detect.php
index 9c59db3..90e3995 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -352,7 +352,7 @@ function detect_stores($r, &$out)
     }
 
     $basedir_str = ini_get('open_basedir');
-    if (gettype($basedir_str) == 'string') {
+    if (gettype($basedir_str) == 'string' && $basedir_str) {
         $url = 'http://www.php.net/manual/en/features.safe-mode.php' .
             '#ini.open-basedir';
         $lnk = $r->link($url, 'open_basedir');
fredden@gordo:/tmp/php-openid/examples$
nandanprac/php-openid,bartuspan/php-openid,CatLabInteractive/php-openid,bartuspan/php-openid,anshu0806/php-openid,Pasarkode/php-openid,anshu0806/php-openid,miska/simple-php-openid-elections,tomhat/php-openid,CatLabInteractive/php-openid,bartuspan/php-openid,tomhat/php-openid,miska/simple-php-openid-elections,nandanprac/php-openid,anshu0806/php-openid,openid/php-openid,marcoceppi/php-openid,openid/php-openid,nandanprac/php-openid,anshu0806/php-openid,pixnet/php-openid,openid/php-openid,pixnet/php-openid,Pasarkode/php-openid,tomhat/php-openid,tomhat/php-openid,pixnet/php-openid,pixnet/php-openid,Pasarkode/php-openid,CatLabInteractive/php-openid,CatLabInteractive/php-openid,anshu0806/php-openid,Pasarkode/php-openid,openid/php-openid,nandanprac/php-openid,marcoceppi/php-openid,marcoceppi/php-openid,nandanprac/php-openid,pixnet/php-openid,CatLabInteractive/php-openid,tomhat/php-openid,Pasarkode/php-openid,miska/simple-php-openid-elections,miska/simple-php-openid-elections,openid/php-openid,bartuspan/php-openid,miska/simple-php-openid-elections,marcoceppi/php-openid,bartuspan/php-openid