mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Fix exception when monster doesn't have look defined
This commit is contained in:
parent
cfc4f3601b
commit
d8f1bf0a50
@ -286,6 +286,10 @@ class OTS_Monster extends DOMDocument
|
|||||||
|
|
||||||
$element = $this->documentElement->getElementsByTagName('look')->item(0);
|
$element = $this->documentElement->getElementsByTagName('look')->item(0);
|
||||||
|
|
||||||
|
if (!$element) {
|
||||||
|
return $look;
|
||||||
|
}
|
||||||
|
|
||||||
$look['type'] = $element->getAttribute('type');
|
$look['type'] = $element->getAttribute('type');
|
||||||
$look['typeex'] = $element->getAttribute('typeex');
|
$look['typeex'] = $element->getAttribute('typeex');
|
||||||
$look['head'] = $element->getAttribute('head');
|
$look['head'] = $element->getAttribute('head');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user