diff options
author | Tim Preston <tim.preston@anusf.anu.edu.au> | 2010-05-07 11:18:41 +0800 |
---|---|---|
committer | lillialexis <lillialexis@gmail.com> | 2010-07-20 03:11:00 +0800 |
commit | 55b2d4e37deeb31b9e227d923652a657fc80ee4c (patch) | |
tree | c70181cadc13b5317156318bcf1cf843b2f18d58 | |
parent | b643228707f6ec4c793c82bd8f152ab31a4e0e23 (diff) | |
download | php-openid-55b2d4e37deeb31b9e227d923652a657fc80ee4c.zip php-openid-55b2d4e37deeb31b9e227d923652a657fc80ee4c.tar.gz php-openid-55b2d4e37deeb31b9e227d923652a657fc80ee4c.tar.bz2 |
fixed Parse::match() returning different types and cleaned call-by-ref warnings
Auth/OpenID/Parse.php
The match() function takes a reference parameter $match and, depending on execution flow, either returns that as an array or a string. This has been modified to now return an array in both cases.
Auth/OpenID/Consumer.php
Auth/Yadis/Manager.php
Fixed two function calls with explicit call-by-reference parameters.
-rw-r--r-- | Auth/OpenID/Consumer.php | 2 | ||||
-rw-r--r-- | Auth/OpenID/Parse.php | 6 | ||||
-rw-r--r-- | Auth/Yadis/Manager.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php index 021c038..5e628d1 100644 --- a/Auth/OpenID/Consumer.php +++ b/Auth/OpenID/Consumer.php @@ -1181,7 +1181,7 @@ class Auth_OpenID_GenericConsumer { // oidutil.log('Performing discovery on %s' % (claimed_id,)) list($unused, $services) = call_user_func($this->discoverMethod, $claimed_id, - &$this->fetcher); + $this->fetcher); if (!$services) { return new Auth_OpenID_FailureResponse(null, diff --git a/Auth/OpenID/Parse.php b/Auth/OpenID/Parse.php index 6c2e721..c81cb01 100644 --- a/Auth/OpenID/Parse.php +++ b/Auth/OpenID/Parse.php @@ -227,7 +227,7 @@ class Auth_OpenID_Parse { if (!mb_ereg_search($regexp)) { return false; } - list($match) = mb_ereg_search_getregs(); + $match = mb_ereg_search_getregs(); return true; } @@ -269,7 +269,7 @@ class Auth_OpenID_Parse { // Try to find the <HEAD> tag. $head_re = $this->headFind(); - $head_match = ''; + $head_match = array(); if (!$this->match($head_re, $stripped, $head_match)) { ini_set( 'pcre.backtrack_limit', $old_btlimit ); return array(); @@ -278,7 +278,7 @@ class Auth_OpenID_Parse { $link_data = array(); $link_matches = array(); - if (!preg_match_all($this->_link_find, $head_match, + if (!preg_match_all($this->_link_find, $head_match[0], $link_matches)) { ini_set( 'pcre.backtrack_limit', $old_btlimit ); return array(); diff --git a/Auth/Yadis/Manager.php b/Auth/Yadis/Manager.php index ee6f68b..5829de6 100644 --- a/Auth/Yadis/Manager.php +++ b/Auth/Yadis/Manager.php @@ -413,7 +413,7 @@ class Auth_Yadis_Discovery { list($yadis_url, $services) = call_user_func($discover_cb, $this->url, - &$fetcher); + $fetcher); $manager = $this->createManager($services, $yadis_url); } |