[BUGFIX] Ensure PHP 5.2 compatibility in php-openid 37/33737/4
authorMichael Stucki <michael.stucki@typo3.org>
Mon, 3 Nov 2014 08:37:37 +0000 (09:37 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 3 Nov 2014 13:00:43 +0000 (14:00 +0100)
The backport #62357 introduced a regression with PHP 5.2,
which still is officially supported by TYPO3 CMS 4.5

Adapt the code to be PHP 5.2 compatible

Resolves: #62391
Releases: 4.5
Change-Id: I72895592e10d963f2777c4659cc1f0a10e69a1c1
Reviewed-on: http://review.typo3.org/33737
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/openid/lib/php-openid/Auth/OpenID/PredisStore.php
typo3/sysext/openid/lib/php-openid/php-openid-typo3.patch

index 14ecbbd..5b97335 100644 (file)
@@ -45,7 +45,7 @@ class Auth_OpenID_PredisStore extends Auth_OpenID_OpenIDStore {
      * @param \Predis\Client $redis  Predis client object
      * @param string         $prefix Prefix for all keys stored to the Redis
      */
-    function Auth_OpenID_PredisStore(\Predis\Client $redis, $prefix = '')
+    function Auth_OpenID_PredisStore($redis, $prefix = '')
     {
         $this->prefix = $prefix;
         $this->redis = $redis;
index be2fd9b..4f5f84b 100644 (file)
@@ -46,3 +46,17 @@ index 627ea9a..af5043e 100644
          curl_setopt($c, CURLOPT_POST, true);
          curl_setopt($c, CURLOPT_POSTFIELDS, $body);
          curl_setopt($c, CURLOPT_TIMEOUT, $this->timeout);
+
+diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/PredisStore.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/PredisStore.php
+index 14ecbbd..5b97335 100644
+--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/PredisStore.php
++++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/PredisStore.php
+@@ -45,7 +45,7 @@ class Auth_OpenID_PredisStore extends Auth_OpenID_OpenIDStore {
+      * @param \Predis\Client $redis  Predis client object
+      * @param string         $prefix Prefix for all keys stored to the Redis
+      */
+-    function Auth_OpenID_PredisStore(\Predis\Client $redis, $prefix = '')
++    function Auth_OpenID_PredisStore($redis, $prefix = '')
+     {
+         $this->prefix = $prefix;
+         $this->redis = $redis;