r87386 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r87385
|
r87386
|
r87387
>
Date:
04:22, 4 May 2011
Author:
bawolff
Status:
ok
Tags:
Comment:
(
bug 28800
) <charinsert>+</charinsert> tries to insert the empty string instead of a literal +.
The code assumed explode( "+", "+" ) gave an empty array, where really it gave an array with
2 elements both of which are the empty string.
Modified paths:
/trunk/extensions/CharInsert/CharInsert.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/extensions/CharInsert/CharInsert.php
—
—
@@ -77,7 +77,7 @@
78
78
79
79
function charInsertItem( $data ) {
80
80
$chars = explode( '+', $data );
81
- if( count( $chars ) > 1 ) {
81
+ if( count( $chars ) > 1 && $chars[0] !== '' ) {
82
82
return charInsertChar( $chars[0], $chars[1], 'Click the character while selecting a text' );
83
83
} elseif( count( $chars ) == 1 ) {
84
84
return charInsertChar( $chars[0] );
Status & tagging log
18:59, 30 June 2011
Bryan
(
talk
|
contribs
)
changed the
status
of r87386
[
removed:
new
added:
ok]