summaryrefslogtreecommitdiffstats
path: root/wp-inst/xmlrpc.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-inst/xmlrpc.php')
-rw-r--r--wp-inst/xmlrpc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/wp-inst/xmlrpc.php b/wp-inst/xmlrpc.php
index 6326596..35af5ff 100644
--- a/wp-inst/xmlrpc.php
+++ b/wp-inst/xmlrpc.php
@@ -1243,6 +1243,9 @@ class wp_xmlrpc_server extends IXR_Server {
}
}
+ if ( empty($context) ) // URL pattern not found
+ return new IXR_Error(17, 'The source URI does not contain a link to the target URI, and so cannot be used as a source.');
+
$pagelinkedfrom = preg_replace('#&([^amp\;])#is', '&$1', $pagelinkedfrom);
$context = '[...] ' . wp_specialchars( $excerpt ) . ' [...]';
@@ -1308,4 +1311,4 @@ class wp_xmlrpc_server extends IXR_Server {
$wp_xmlrpc_server = new wp_xmlrpc_server();
-?>
+?> \ No newline at end of file