From: Nick Jenkins Date: Tue, 14 Nov 2006 07:21:40 +0000 (+0000) Subject: Prevent PHP Notice: "Uninitialized string offset: 0 in includes/Linker.php on line... X-Git-Tag: 1.31.0-rc.0~55188 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=8ca554e9b15ef6b4711c622b7221d753532910c6;p=lhc%2Fweb%2Fwiklou.git 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 "[[]]". --- 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 ); }