Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#91 bug in method convert_text in class simple_html_dom_node

open
nobody
None
7
2012-10-10
2011-11-16
gurgel
No

the follwoing lines has a mistake:
...
$sourceCharset = "";
$targetCharset = "";
if ($this->dom) {
$sourceCharset = strtoupper($this->dom->_charset);
$targetCharset = strtoupper($this->dom->_target_charset);
}
...

because the dom objects properties _charset and _target_charset are declared as protected, they are not accessible.
You have to use the magic funtion to access them, so use intsetad:

        $sourceCharset = strtoupper($this->dom->charset);
        $targetCharset = strtoupper($this->dom->target_charset);

Discussion