From 7cd02d97f24567300988929aa005a226b9c43939 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20P=C3=A9rez=20Crespo?= <jaime.perez@uninett.no>
Date: Wed, 17 Oct 2012 15:53:41 +0000
Subject: [PATCH] Fixes for compatibility with PHP 5.4.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3193 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/InfoCard/lib/STS.php                        | 4 ++--
 modules/expirycheck/lib/Auth/Process/ExpiryDate.php | 2 +-
 modules/oauth/bin/demo.php                          | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/InfoCard/lib/STS.php b/modules/InfoCard/lib/STS.php
index a9530efd4..0ba0e14dc 100644
--- a/modules/InfoCard/lib/STS.php
+++ b/modules/InfoCard/lib/STS.php
@@ -360,7 +360,7 @@ class sspmod_InfoCard_STS {
 			$canonicalbuf = sspmod_InfoCard_Utils::canonicalize($signedinfo);
 			$privkey = openssl_pkey_get_private(file_get_contents($config['sts_key']));
 			$signature = '';
-			openssl_sign($canonicalbuf, &$signature, $privkey);
+			openssl_sign($canonicalbuf, $signature, $privkey);
 			openssl_free_key($privkey);
 			$samlsignature = base64_encode($signature);
 	
@@ -381,4 +381,4 @@ class sspmod_InfoCard_STS {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
index 65b8395f5..65a56ca17 100644
--- a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
+++ b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
@@ -121,7 +121,7 @@ class sspmod_expirycheck_Auth_Process_ExpiryDate extends SimpleSAML_Auth_Process
 		$netId = $state['Attributes'][$this->netid_attr][0];
 		$expireOnDate = strtotime($state['Attributes'][$this->expirydate_attr][0]);
 
-		if (self::shWarning(&$state, $expireOnDate, $this->warndaysbefore)) {
+		if (self::shWarning($state, $expireOnDate, $this->warndaysbefore)) {
 			assert('is_array($state)');
 			if (isset($state['isPassive']) && $state['isPassive'] === TRUE) {
 				/* We have a passive request. Skip the warning. */
diff --git a/modules/oauth/bin/demo.php b/modules/oauth/bin/demo.php
index 1f45b0b6b..49ebad860 100755
--- a/modules/oauth/bin/demo.php
+++ b/modules/oauth/bin/demo.php
@@ -2,7 +2,7 @@
 <?php
 
 
-function readline($prompt = '') {
+function _readline($prompt = '') {
     echo $prompt;
     return rtrim( fgets( STDIN ), "\n" );
 }
@@ -40,7 +40,7 @@ try {
 	echo('Go to this URL to authenticate/authorize the request: ' . $url . "\n");
 	system('open ' . $url);
 
-	readline('Click enter when you have completed the authorization step using your web browser...');
+	_readline('Click enter when you have completed the authorization step using your web browser...');
 
 	// Replace the request token with an access token
 	$accessToken = $consumer->getAccessToken( $baseurl . '/module.php/oauth/accessToken.php', $requestToken);
-- 
GitLab