Skip to content

Commit

Permalink
fixed path issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsilkjr86 committed Jul 16, 2018
1 parent 03f6795 commit 21a2522
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MarketplaceWebService/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private function fromDOMElement(DOMElement $dom)
if ($this->isComplexType($fieldType[0])) {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length >= 1) {
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
require_once (dirname(__FILE__) . '/../' . str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
foreach ($elements as $element) {
$this->fields[$fieldName]['FieldValue'][] = new $fieldType[0]($element);
}
Expand All @@ -185,7 +185,7 @@ private function fromDOMElement(DOMElement $dom)
if ($this->isComplexType($fieldType)) {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length == 1) {
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
require_once (dirname(__FILE__) . '/../' . str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
$this->fields[$fieldName]['FieldValue'] = new $fieldType($elements->item(0));
}
} else {
Expand Down Expand Up @@ -231,7 +231,7 @@ private function fromAssociativeArray(array $array)
$elements = array($elements);
}
if (count ($elements) >= 1) {
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
require_once (dirname(__FILE__) . '/../' . str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
foreach ($elements as $element) {
$this->fields[$fieldName]['FieldValue'][] = new $fieldType[0]($element);
}
Expand All @@ -253,7 +253,7 @@ private function fromAssociativeArray(array $array)
} else {
if ($this->isComplexType($fieldType)) {
if (array_key_exists($fieldName, $array)) {
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
require_once (dirname(__FILE__) . '/../' . str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
$this->fields[$fieldName]['FieldValue'] = new $fieldType($array[$fieldName]);
}
} else {
Expand Down

0 comments on commit 21a2522

Please sign in to comment.