Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Jan 17, 2020
1 parent af50c0a commit 733882f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Return the information for the Person

## Building an executable
Install the binary dependencies with composer (`composer install`).
Run `ant phar` or `ant phar-nightly`
Run `phing phar` or `phing phar-nightly`

## Libraries
This app usage the following libraries:
Expand Down
10 changes: 8 additions & 2 deletions src/PHPDraft/Model/Elements/ObjectStructureElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ class ObjectStructureElement extends BasicStructureElement
*/
public function parse($object, array &$dependencies): StructureElement
{
if (empty($object) || !isset($object->content)) {
if (!isset($object->content) && isset($object->meta)) {
$this->element = $object->element;
$this->parse_common($object, $dependencies);
return $this;
}

if (empty($object) || !(isset($object->content) || isset($object->meta)) ) {
return $this;
}

Expand Down Expand Up @@ -78,7 +84,7 @@ protected function parse_value_structure($object, array &$dependencies)
break;
case 'object':
default:
$value = isset($object->content->value->content) ? $object->content->value->content : NULL;
$value = $object->content->value->content ?? NULL;
$struct = $this->new_instance();

$this->value = $struct->parse($value, $dependencies);
Expand Down

0 comments on commit 733882f

Please sign in to comment.