diff --git a/modules/InfoCard/lib/STS.php b/modules/InfoCard/lib/STS.php
index a9530efd4694556e5c2241ade3e82e01f702f071..0ba0e14dce6951bd8cb4c6f95e0327dd56fab997 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 65b8395f5df48636c065bda1350cd9291d66bffe..65a56ca176c1a798a57c7e1b3cd8e6d47ffeb557 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 1f45b0b6bdfabf46478729724b75f00ee8a8de73..49ebad860a4fdf168cf65ff11e74b698b6aad5ff 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);