1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
Description: Don't access string offsets via curly braces.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
--- a/wicked-2.0.8/lib/Text_Wiki/Text/Wiki.php
+++ b/wicked-2.0.8/lib/Text_Wiki/Text/Wiki.php
@@ -1029,7 +1029,7 @@
for ($i = 0; $i < $k; $i++) {
// the current character
- $char = $this->source{$i};
+ $char = $this->source[$i];
// are alredy in a delimited section?
if ($in_delim) {
--- a/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Parse/Default/Wikilink.php
+++ b/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Parse/Default/Wikilink.php
@@ -185,7 +185,7 @@
{
// when prefixed with !, it's explicitly not a wiki link.
// return everything as it was.
- if ($matches[2]{0} == '!') {
+ if ($matches[2][0] == '!') {
return $matches[1] . substr($matches[2], 1) . $matches[3];
}
--- a/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Parse/Default/Smiley.php
+++ b/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Parse/Default/Smiley.php
@@ -111,15 +111,15 @@
$cur = $smiley;
}
$len = strlen($cur);
- if (($cur{0} == ':') && ($len > 2) && ($cur{$len - 1} == ':')) {
+ if (($cur[0] == ':') && ($len > 2) && ($cur[$len - 1] == ':')) {
$reg1 .= $sep1 . preg_quote(substr($cur, 1, -1), '#');
$sep1 = '|';
continue;
}
if ($autoNose && ($len === 2)) {
- $variante = $cur{0} . '-' . $cur{1};
+ $variante = $cur[0] . '-' . $cur[1];
$this->_smileys[$variante] = &$this->_smileys[$smiley];
- $cur = preg_quote($cur{0}, '#') . '-?' . preg_quote($cur{1}, '#');
+ $cur = preg_quote($cur[0], '#') . '-?' . preg_quote($cur[1], '#');
} else {
$cur = preg_quote($cur, '#');
}
--- a/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Render/Docbook/Colortext.php
+++ b/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Render/Docbook/Colortext.php
@@ -70,7 +70,7 @@
$color = $options['color'];
if (!in_array($color, $this->getConf('colors', array())) &&
- $color{0} != '#') {
+ $color[0] != '#') {
$color = '#' . $color;
}
return '<phrase role="' . $this->getConf('role', 'color') . '" ' .
--- a/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Render/Docbook/Url.php
+++ b/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Render/Docbook/Url.php
@@ -77,7 +77,7 @@
} else {
// should we build a target clause?
- if ($href{0} == '#' ||
+ if ($href[0] == '#' ||
strtolower(substr($href, 0, 7)) == 'mailto:') {
// targets not allowed for on-page anchors
// and mailto: links.
--- a/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php
+++ b/wicked-2.0.8/lib/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php
@@ -63,7 +63,7 @@
$type = $options['type'];
$color = $options['color'];
- if (! in_array($color, $this->colors) && $color{0} != '#') {
+ if (! in_array($color, $this->colors) && $color[0] != '#') {
$color = '#' . $color;
}
|