Call to a member function getDocNamespaces() on bool
-
I’ve got a plugin that downloads an XML file and saves it to the WP Uploads folder. The plugin runs just fine when triggered manually, but it throws an error into the log when run via wp_cron. I’m getting this error:
PHP Fatal error: Uncaught Error: Call to a member function getDocNamespaces() on bool
The line it’s throwing the error about is the last line of this block:
$buffer = file_get_contents($url); $buffer = str_replace(array("\n", "\r", "\t"), '', $buffer); $xml = simplexml_load_string($buffer, null, LIBXML_NOCDATA); $namespaces = $xml->getDocNamespaces(true);
Any idea why I’d get an error via the scheduled run but not via a manual run? I’m not sure how to troubleshoot since I can’t reproduce the error manually.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.