From 8ca554e9b15ef6b4711c622b7221d753532910c6 Mon Sep 17 00:00:00 2001 From: Nick Jenkins Date: Tue, 14 Nov 2006 07:21:40 +0000 Subject: [PATCH] Prevent PHP Notice: "Uninitialized string offset: 0 in includes/Linker.php on line 954" in error_reporting(E_ALL) mode, when doing a "Show Preview" with the edit summary as just "[[]]". --- includes/Linker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Linker.php b/includes/Linker.php index 84fe82bb93..9bebea2c96 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -951,7 +951,7 @@ class Linker { $trail = ""; } $linkRegexp = '/\[\[(.*?)\]\]' . preg_quote( $trail, '/' ) . '/'; - if ($match[1][0] == ':') + if (isset($match[1][0]) && $match[1][0] == ':') $match[1] = substr($match[1], 1); $thelink = $this->makeLink( $match[1], $text, "", $trail ); } -- 2.20.1