XML-RPC: Avoid a PHP notice in pingback_ping() method.

props jesin, simonp303.
fixes #29177.

git-svn-id: https://develop.svn.wordpress.org/trunk@29464 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-08-11 15:18:08 +00:00
parent 5b2ae73e18
commit 9f3b8dbead
1 changed files with 1 additions and 1 deletions

View File

@ -5759,7 +5759,7 @@ class wp_xmlrpc_server extends IXR_Server {
$urltest = parse_url($pagelinkedto);
if ( $post_ID = url_to_postid($pagelinkedto) ) {
$way = 'url_to_postid()';
} elseif ( preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) {
} elseif ( isset( $urltest['path'] ) && preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) {
// the path defines the post_ID (archives/p/XXXX)
$blah = explode('/', $match[0]);
$post_ID = (int) $blah[1];