From c089030fa9b71ce0abe7e96e3425076b7c6e08c4 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 17 Aug 2009 09:05:29 +0000
Subject: [PATCH] Replace split(...) with explode(...) as split is depreceated
 from PHP 5.3.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1678 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/AuthMemCookie.php     | 2 +-
 lib/SimpleSAML/Utilities.php         | 6 +++---
 modules/adfs/www/idp/prp.php         | 4 ++--
 modules/statistics/lib/LogParser.php | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/SimpleSAML/AuthMemCookie.php b/lib/SimpleSAML/AuthMemCookie.php
index e15e0b9b4..79824d1f3 100644
--- a/lib/SimpleSAML/AuthMemCookie.php
+++ b/lib/SimpleSAML/AuthMemCookie.php
@@ -114,7 +114,7 @@ class SimpleSAML_AuthMemCookie {
 
 		$memcache = new Memcache;
 
-		foreach (split(",",$memcacheHost) as $memcacheHost) {
+		foreach (explode(',', $memcacheHost) as $memcacheHost) {
 			$memcache->addServer($memcacheHost, $memcachePort);
 		}
 
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index a38c1a289..781e26e2b 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -596,7 +596,7 @@ class SimpleSAML_Utilities {
 	 */
 	static function ipCIDRcheck($cidr, $ip = null) {
 		if ($ip == null) $ip = $_SERVER['REMOTE_ADDR'];
-		list ($net, $mask) = split ("/", $cidr);
+		list ($net, $mask) = explode('/', $cidr);
 		
 		$ip_net = ip2long ($net);
 		$ip_mask = ~((1 << (32 - $mask)) - 1);
@@ -1309,8 +1309,8 @@ class SimpleSAML_Utilities {
 		assert('is_string($query_string)');
 
 		$res = array();
-		foreach(split('&', $query_string) as $param) {
-			$param = split('=', $param);
+		foreach(explode('&', $query_string) as $param) {
+			$param = explode('=', $param);
 			$name = urldecode($param[0]);
 			if(count($param) === 1) {
 				$value = '';
diff --git a/modules/adfs/www/idp/prp.php b/modules/adfs/www/idp/prp.php
index 9f0cbb101..69d148903 100644
--- a/modules/adfs/www/idp/prp.php
+++ b/modules/adfs/www/idp/prp.php
@@ -107,8 +107,8 @@ if (isset($_GET['wa'])) {
 		try {
 			// accomodate for disfunctional $_GET "windows" slash decoding in PHP
 			$wctx = $_GET['wctx'];
-			foreach (split('&', $_SERVER['REQUEST_URI']) as $e) {
-				$a = split('=', $e);
+			foreach (explode('&', $_SERVER['REQUEST_URI']) as $e) {
+				$a = explode('=', $e);
 				if ($a[0] == 'wctx') $wctx = urldecode($a[1]);
 			}
 			$requestid = $wctx;
diff --git a/modules/statistics/lib/LogParser.php b/modules/statistics/lib/LogParser.php
index 1094e7a9d..5d1ff70df 100644
--- a/modules/statistics/lib/LogParser.php
+++ b/modules/statistics/lib/LogParser.php
@@ -32,7 +32,7 @@ class sspmod_statistics_LogParser {
 
 	public function parseContent($line) {
 		$contentstr = substr($line, $this->offset);
-		$content = split(' ', $contentstr);
+		$content = explode(' ', $contentstr);
 		return $content;
 	}
 	
-- 
GitLab