Possible bug: typo in source code?

Topics: Developer Forum
Apr 8 at 10:16 AM
PHP Version 5.2.17
PHPExcel 1.8

I produced this error when I tried to output a .xlsx file with HTML rich text formatting.

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /.../phpexcel/Classes/PHPExcel/Helper/HTML.php on line 591

When I took a look at Helper/HTML.php on line 591, I found this:
$dom = new \DOMDocument;
After I removed the backslash, the error was resolved.

There is no problem with the backslash when I tested on PHP 5.5.9, since object namespaces were introduced in 5.3.0. But in 5.2 (the minimum version required for PHPExcel 1.8), this seems to be causing an error.