Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
$dom->getElementsByTagName($key)->item(0)->nodeValue = (string) $value;

I have this line which throws this error. I am working with DOMDocument for years and never experienced this before. Actually I am testing the $dom before just to make sure it's all good like this:

if (gettype($dom) === "object") {
    if ($dom instanceof DOMDocument) {
share|improve this question
    
Is $dom->getElementsByTagName($key)->length>0? –  Passerby Feb 27 '13 at 3:39
    
The problem is solved. The $dom was an outdated version from memcached, which just needed to be read again from the file. My bad. –  iroybot Mar 1 '13 at 21:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.