Skip to content

Commit 733882f

Browse files
committed
Small fixes
1 parent af50c0a commit 733882f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Return the information for the Person
7272

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

7777
## Libraries
7878
This app usage the following libraries:

src/PHPDraft/Model/Elements/ObjectStructureElement.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ class ObjectStructureElement extends BasicStructureElement
2626
*/
2727
public function parse($object, array &$dependencies): StructureElement
2828
{
29-
if (empty($object) || !isset($object->content)) {
29+
if (!isset($object->content) && isset($object->meta)) {
30+
$this->element = $object->element;
31+
$this->parse_common($object, $dependencies);
32+
return $this;
33+
}
34+
35+
if (empty($object) || !(isset($object->content) || isset($object->meta)) ) {
3036
return $this;
3137
}
3238

@@ -78,7 +84,7 @@ protected function parse_value_structure($object, array &$dependencies)
7884
break;
7985
case 'object':
8086
default:
81-
$value = isset($object->content->value->content) ? $object->content->value->content : NULL;
87+
$value = $object->content->value->content ?? NULL;
8288
$struct = $this->new_instance();
8389

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

0 commit comments

Comments
 (0)