ConFoo Montreal 2026: Call for Papers

Voting

: one plus four?
(Example: nine)

The Note You're Voting On

olalonde at NOSPAM dot gmail dot com
17 years ago
For some reason, when you set DOMDocument's property 'recover' to true, using '@' to mask errors thrown by loadXml() won't work.

Here's my workaround:

function maskErrors() {}
set_error_handler('maskErrors');
$dom->loadXml($xml);
restore_error_handler();

You could also simply do this: error_reporting(0); and then set back error_reporting to its original state.

<< Back to user notes page

To Top