Skip to content

Commit b3e4672

Browse files
Stephen SmithStephen Smith
authored andcommitted
Fix isssue with case sensitivity on loading ArryToXml class
1 parent 081aa45 commit b3e4672

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ArrayToXml.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
namespace slightlydiff\xero;
33

4-
class ArrayToXML {
4+
class ArrayToXml {
55
/**
66
* The main function for converting to an XML document.
77
* Pass in a multi dimensional array and this recrusively loops through and
@@ -38,12 +38,12 @@ public static function toXML($data, $rootNodeName = 'ResultSet', &$xml = null) {
3838

3939
// if there is another array found recursively call this function
4040
if (is_array($value)) {
41-
$node = (ArrayToXML::isAssoc($value) || $numeric) ? $xml->addChild($key) : $xml;
41+
$node = (ArrayToXml::isAssoc($value) || $numeric) ? $xml->addChild($key) : $xml;
4242

4343
// recursive call.
4444
if ($numeric)
4545
$key = 'anon';
46-
ArrayToXML::toXml($value, $key, $node);
46+
ArrayToXml::toXml($value, $key, $node);
4747
} else {
4848

4949
// add single node.
@@ -80,7 +80,7 @@ public static function toArray($xml) {
8080
return (string)$xml;
8181
$arr = array();
8282
foreach ($children as $key => $node) {
83-
$node = ArrayToXML::toArray($node);
83+
$node = ArrayToXml::toArray($node);
8484

8585
// support for 'anon' non-associative arrays
8686
if ($key == 'anon')

src/XeroApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function __call($command, $arguments) {
132132
if (is_a($arguments[1], 'SimpleXMLElement')) {
133133
$post_body = $arguments[1]->asXML();
134134
} elseif (is_array($arguments[1])) {
135-
$post_body = ArrayToXML::toXML($arguments[1], $rootNodeName = $api_command['slug']);
135+
$post_body = ArrayToXml::toXML($arguments[1], $rootNodeName = $api_command['slug']);
136136
}
137137
$post_body = trim(substr($post_body, (stripos($post_body, ">") + 1)));
138138
} else {

0 commit comments

Comments
 (0)