--TEST-- Read $ownerElement with null parent. --CREDITS-- Travis Pew # TestFest Atlanta 2009-05-14 --SKIPIF-- --FILE-- createElement('root'); $document->appendChild($root); $attr = $root->setAttribute('category', 'books'); $document->removeChild($root); $root = null; try { var_dump($attr->ownerElement); } catch (\Error $e) { echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL; } ?> --EXPECT-- Error: Couldn't fetch DOMAttr. Node no longer exists