php-openid
php-openid copied to clipboard
Call-time pass-by-reference is deprecated
I am getting some PHP Errors as you cannot pass references in function like call_user_function() and call_user_function_array() anymore. It was a warning in PHP5, and it errors out in 5.3.
So '&' should be removed from :
- Consumer.php line 669
- Consumer.php line 1184
- Server.php line 1707
- TrustRoot.php line 416
- XRDS.php line 432
- Yadis.php line 144
- Manager.php line 416
And that's fixed !
+1 - I cannot use it because of this problem.
+1 as well. Unable to use as a result.
+1 Proper PHP 5.3 compatibility would be great!
Index: OpenID/Consumer.php =================================================================== --- OpenID/Consumer.php (revision 12) +++ OpenID/Consumer.php (working copy) @@ -666,7 +666,7 @@ '_completeInvalid'); return call_user_func_array(array($this, $method), - array($message, &$endpoint, $return_to)); + array($message, $endpoint, $return_to)); } /** @@ -1181,7 +1181,7 @@ // 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, Index: OpenID/Server.php =================================================================== --- OpenID/Server.php (revision 12) +++ OpenID/Server.php (working copy) @@ -1704,7 +1704,7 @@ { if (method_exists($this, "openid_" . $request->mode)) { $handler = array($this, "openid_" . $request->mode); - return call_user_func($handler, &$request); + return call_user_func($handler, $request); } return null; } Index: OpenID/TrustRoot.php =================================================================== --- OpenID/TrustRoot.php (revision 12) +++ OpenID/TrustRoot.php (working copy) @@ -413,7 +413,7 @@ } call_user_func_array($discover_function, - array($relying_party_url, &$fetcher)); + array($relying_party_url, $fetcher)); $return_to_urls = array(); $matching_endpoints = Auth_OpenID_extractReturnURL($endpoints); Index: Yadis/Manager.php =================================================================== --- Yadis/Manager.php (revision 12) +++ Yadis/Manager.php (working copy) @@ -413,7 +413,7 @@ list($yadis_url, $services) = call_user_func($discover_cb, $this->url, - &$fetcher); + $fetcher); $manager = $this->createManager($services, $yadis_url); } Index: Yadis/XRDS.php =================================================================== --- Yadis/XRDS.php (revision 12) +++ Yadis/XRDS.php (working copy) @@ -429,7 +429,7 @@ foreach ($filters as $filter) { - if (call_user_func_array($filter, array(&$service))) { + if (call_user_func_array($filter, array($service))) { $matches++; if ($filter_mode == SERVICES_YADIS_MATCH_ANY) { Index: Yadis/Yadis.php =================================================================== --- Yadis/Yadis.php (revision 12) +++ Yadis/Yadis.php (working copy) @@ -141,7 +141,7 @@ } $yadis_result = call_user_func_array($discover_func, - array($input_url, &$fetcher)); + array($input_url, $fetcher)); if ($yadis_result === null) { return array($input_url, array());
Why not make a new release with this patch applied? If it is tested to work and there is no other way to do it... why require everyone to apply it on their own?
Still, seriously. Thanks for providing this library.
Yep, a least we wouldn't lost time each time we want to implement the library... In addition, there is multiples forks, but I don't know which is the best to use.
Just got this plugin working for PHP 5.5.9 with the patch above.
This repo is being archived. Closing issue.