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:
parent
5b2ae73e18
commit
9f3b8dbead
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue