Poniższy kod:
public function getDomElement() { $newEntry = new \DOMElement("LogEntry"); $newEntry->setAttribute('dataDodania', $this->getDataUtworzenia()->format('d-m-Y H:i:s')); $newEntry->setAttribute('typObiektu', $this->getTypObiektu()); $newEntry->appendChild(new \DOMElement('trescKomunikatu', $this->getTrescKomunikatu())); return $newEntry; }
powoduje błąd:
Kod
Fatal error: Uncaught exception 'DOMException' with message 'No Modification Allowed Error' in D:\xampp1.8.2\htdocs\sklep\branches\ver_1.30_rejestracja_logowan\Core\Log\LogEntry.php on line 77
( ! ) DOMException: No Modification Allowed Error in D:\xampp1.8.2\htdocs\sklep\branches\ver_1.30_rejestracja_logowan\Core\Log\LogEntry.php on line 77
( ! ) DOMException: No Modification Allowed Error in D:\xampp1.8.2\htdocs\sklep\branches\ver_1.30_rejestracja_logowan\Core\Log\LogEntry.php on line 77
Czy DomElement musi być zawsze tworzony w ramach DomDocument?