Make WordPress Core

Ticket #29177: 29177.diff

File 29177.diff, 671 bytes (added by jesin, 10 years ago)
  • wp-includes/class-wp-xmlrpc-server.php

     
    57595759                $urltest = parse_url($pagelinkedto);
    57605760                if ( $post_ID = url_to_postid($pagelinkedto) ) {
    57615761                        $way = 'url_to_postid()';
    5762                 } elseif ( preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) {
     5762                } elseif ( isset( $urltest['path'] ) && preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) {
    57635763                        // the path defines the post_ID (archives/p/XXXX)
    57645764                        $blah = explode('/', $match[0]);
    57655765                        $post_ID = (int) $blah[1];