Skip to content
Snippets Groups Projects
Commit 72fc6d31 authored by Mohammad Jangda's avatar Mohammad Jangda
Browse files

Pull XML: Fail and blog instances where the post_root XPath fails to find any nodes.

parent e88962d8
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,14 @@ class Syndication_WP_XML_Client implements Syndication_Client {
}
$post_position = 0;
foreach ($xml->xpath($post_root) as $item) {
$items = $xml->xpath( $post_root );
if ( empty( $items ) ) {
self::log_post( 'n/a', null, get_post($this->site_ID), sprintf( __( 'No post nodes found using XPath "%s" in feed', 'push-syndication' ), $post_root ) );
return array();
}
foreach ( $items as $item ) {
$item_fields = array();
$enclosures = array();
$meta_data = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment