We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6b4677 commit 558a08eCopy full SHA for 558a08e
src/Metadata/Xmp/ImageRegion.php
@@ -81,11 +81,19 @@ class ImageRegion
81
public $rbVertices;
82
83
/**
84
- * @param \DOMXPath $xpath
85
- * @param \DOMNode $node <rdf:li> node.
+ * Initialize members if a node is provided.
+ *
86
+ * @param \DOMXPath|null $xpath
87
+ * @param \DOMNode|null $node <rdf:li> node.
88
*/
- public function __construct($xpath, $node)
89
+ public function __construct($xpath = null, $node = null)
90
{
91
+ if (!$xpath || !$node) {
92
+ // A test case probably wants to forge manually an instance of this
93
+ // class.
94
+ return;
95
+ }
96
+
97
$this->id = self::getNodeValue($xpath, 'Iptc4xmpExt:rId', $node);
98
$this->names = self::getNodeValues(
99
$xpath,
0 commit comments