Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Call-time pass-by-reference is deprecated #8

Closed
ccazette opened this issue May 22, 2010 · 8 comments
Closed

Call-time pass-by-reference is deprecated #8

ccazette opened this issue May 22, 2010 · 8 comments

Comments

@ccazette
Copy link

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 !

@meglio
Copy link

meglio commented Mar 23, 2011

+1 - I cannot use it because of this problem.

@atrauzzi
Copy link

+1 as well. Unable to use as a result.

@DerManoMann
Copy link

+1 Proper PHP 5.3 compatibility would be great!

@jdpond
Copy link

jdpond commented Jun 11, 2011

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());

@ErikDeBruijn
Copy link

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.

@dinacel
Copy link

dinacel commented Jul 3, 2011

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.

@timdream timdream mentioned this issue Jan 2, 2012
marcoceppi added a commit that referenced this issue Dec 17, 2013
issue #8 fix (PHP 5.4 call-time pass-by-reference removed)
@Woseseltops
Copy link

Just got this plugin working for PHP 5.5.9 with the patch above.

@timcappalli
Copy link
Member

This repo is being archived. Closing issue.

@timcappalli timcappalli closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants