mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 02:04:26 +00:00
Error checking for HTTP requests. Props jacobsantos. see #7793
git-svn-id: https://develop.svn.wordpress.org/trunk@9051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1316,7 +1316,10 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
|
||||
'excerpt' => urlencode($excerpt)
|
||||
);
|
||||
|
||||
wp_remote_post($trackback_url, $options);
|
||||
$response = wp_remote_post($trackback_url, $options);
|
||||
|
||||
if ( is_wp_error( $response ) )
|
||||
return;
|
||||
|
||||
$tb_url = addslashes( $trackback_url );
|
||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', '$tb_url') WHERE ID = %d", $ID) );
|
||||
|
||||
Reference in New Issue
Block a user