Simpler method for getting the first char

This commit is contained in:
Tom Needham 2013-01-24 10:49:48 +00:00
parent d89be72972
commit b26279546c
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {