From 42b21405cf968543a166b1573b0b46d783582091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Tue, 27 Jan 2009 08:34:20 +0000 Subject: [PATCH] Allow arrayize to set the index of the new array git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1196 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Utilities.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index b8a2630fe..d41943ea8 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -1661,11 +1661,11 @@ class SimpleSAML_Utilities { /* * Input is single value or array, returns an array. */ - public static function arrayize($data) { + public static function arrayize($data, $index = 0) { if (is_array($data)) { return $data; } else { - return array($data); + return array($index => $data); } } -- GitLab