From b26279546c78618b167e4a8e7a4a10db01c7d479 Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Thu, 24 Jan 2013 10:49:48 +0000 Subject: Simpler method for getting the first char --- lib/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api.php b/lib/api.php index d4deac24c7c..76542156d95 100644 --- a/lib/api.php +++ b/lib/api.php @@ -189,7 +189,7 @@ class OC_API { private static function toXML($array, $writer) { foreach($array as $k => $v) { - if (substr($k, 0, 1) === '@') { + if ($k[0] === '@') { $writer->writeAttribute(substr($k, 1), $v); continue; } else if (is_numeric($k)) { -- cgit v1.2.3