Causes Error in class-wp-xmlrpc-server.php
-
This Theme will cause an Error strpos(): Empty delimiter in class-wp-xmlrpc-server.php because of empty guid fields being inserted into the posts database table for attachments. These records are created when you upload a new logo or page header graphic (perhaps other images which are uploaded through the Pagelines Theme interface).
The End Result is that MS Live Writer and other authoring software, mysteriously stops working and because the XML output becomes mangled due to an error being thrown.
This is the code it breaks because it writes an empty guid field.
$attachments = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '0' AND post_type = 'attachment'" );
if ( is_array( $attachments ) ) {
foreach ( $attachments as $file ) {
if ( strpos( $post_content, $file->guid ) !== false )
$wpdb->update($wpdb->posts, array('post_parent' => $post_ID), array('ID' => $file->ID) );
}
}
}
Personally, I’m rather stunned that a theme could render such a functionality useless. To the point that even removing the theme itself does not correct the issue.
- The topic ‘Causes Error in class-wp-xmlrpc-server.php’ is closed to new replies.