From cd87358195683a618b4cf98d6b1843e8212d0d29 Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Thu, 9 Jun 2011 08:17:14 -0600 Subject: [PATCH] Minor fix to relative urls --- inc/roots-cleanup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/roots-cleanup.php b/inc/roots-cleanup.php index 88bfd78..dc302fe 100644 --- a/inc/roots-cleanup.php +++ b/inc/roots-cleanup.php @@ -78,7 +78,7 @@ add_filter('get_search_query', 'roots_search_query'); function roots_root_relative_url($input) { preg_match('/(https?:\/\/[^\/|"]+)/', $input, $matches); // make sure we aren't making external links relative - if (strpos($matches[0], site_url()) === false) { + if (isset($matches[0]) && strpos($matches[0], site_url()) === false) { return $input; } else { return str_replace(end($matches), '', $input);