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

Close

#7 syntax error in class_xml_check

open
nobody
None
5
2006-04-08
2006-04-08
Anonymous
No

There are a series of consecutive syntax errors that
cause class_xml_check to fail in PHP 5.05+ with this error:

"Cannot access empty property in
/class_xml_check/class_xml_check.php on line 99"

This code:

function _init() {
$this->error_code = '';
$this->$error_line = '';
$this->$error_col = '';
$this->$error_msg = '';
$this->$size = 0;
$this->$elements = 0;
$this->$attributes = 0;
$this->$texts = 0;
$this->$text_size = 0;
}

Should really be this:

function _init() {
$this->error_code = '';
$this->error_line = '';
$this->error_col = '';
$this->error_msg = '';
$this->size = 0;
$this->elements = 0;
$this->attributes = 0;
$this->texts = 0;
$this->text_size = 0;
}

PHP 5.04 and earlier auto corrects this problem, but as
of 5.05 an error is thrown.

You can reach me at mailforlindsay@gmail.com
Let me know if you put an updated version online
because i prefer using use unmodified open source code. :)

Thanks for the work youve done on these classes guys,
they're a big help!

Lindsay

Discussion