/installer/composer-patches/text_wiki_mediawiki__php8fixes.patch
Patch | 231 lines | 221 code | 10 blank | 0 comment | 0 complexity | 18ec584e9e08c653c1bad8b1e8921587 MD5 | raw file
- diff --git a/Text/Wiki.php b/Text/Wiki.php
- index 647999e..aa83d57 100644
- --- a/Text/Wiki.php
- +++ b/Text/Wiki.php
- @@ -1037,7 +1037,7 @@ class Text_Wiki {
- 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) {
- diff --git a/Text/Wiki/Parse/BBCode/Colortext.php b/Text/Wiki/Parse/BBCode/Colortext.php
- index 5840043..d107eb6 100755
- --- a/Text/Wiki/Parse/BBCode/Colortext.php
- +++ b/Text/Wiki/Parse/BBCode/Colortext.php
- @@ -81,7 +81,7 @@ class Text_Wiki_Parse_Colortext extends Text_Wiki_Parse {
- }
-
- // needs to withdraw leading # as renderer put it in
- - $color = $matches[1]{0} == '#' ? substr($matches[1], 1) : $matches[1];
- + $color = $matches[1][0] == '#' ? substr($matches[1], 1) : $matches[1];
-
- // builds the option array
- $options = array('type' => 'start', 'level' => $this->_level, 'color' => $color);
- diff --git a/Text/Wiki/Parse/BBCode/Url.php b/Text/Wiki/Parse/BBCode/Url.php
- index 7ae4ea8..0e19401 100644
- --- a/Text/Wiki/Parse/BBCode/Url.php
- +++ b/Text/Wiki/Parse/BBCode/Url.php
- @@ -143,7 +143,7 @@ class Text_Wiki_Parse_Url extends Text_Wiki_Parse {
- if ($matches[2] === '=') {
- $type = 'descr';
- } elseif ($matches[2]) {
- - $pre = $matches[1]{0};
- + $pre = $matches[1][0];
- }
- }
- $matches[2] = 'mailto:' . $matches[3];
- diff --git a/Text/Wiki/Parse/Cowiki/Paragraph.php b/Text/Wiki/Parse/Cowiki/Paragraph.php
- index 8a535ef..18c3acc 100644
- --- a/Text/Wiki/Parse/Cowiki/Paragraph.php
- +++ b/Text/Wiki/Parse/Cowiki/Paragraph.php
- @@ -112,7 +112,7 @@ class Text_Wiki_Parse_Paragraph extends Text_Wiki_Parse {
- $key = '';
- $len = strlen($matches[0]);
- for ($i = 1; $i < $len; $i++) {
- - $char = $matches[0]{$i};
- + $char = $matches[0][$i];
- if ($char == $delim) {
- break;
- } else {
- diff --git a/Text/Wiki/Parse/Cowiki/Wikilink.php b/Text/Wiki/Parse/Cowiki/Wikilink.php
- index d2c974f..dfcc9f3 100644
- --- a/Text/Wiki/Parse/Cowiki/Wikilink.php
- +++ b/Text/Wiki/Parse/Cowiki/Wikilink.php
- @@ -195,7 +195,7 @@ class Text_Wiki_Parse_Wikilink extends Text_Wiki_Parse {
- {
- // when prefixed with !, it's explicitly not a wiki link.
- // return everything as it was.
- - /*if ($matches[3]{0} == '!') {
- + /*if ($matches[3][0] == '!') {
- return $matches[1] . substr($matches[3], 1) . $matches[4] . $matches[7];
- }*/
- if (!isset($matches[4])) {
- diff --git a/Text/Wiki/Parse/Creole/Paragraph.php b/Text/Wiki/Parse/Creole/Paragraph.php
- index c286396..ad64516 100644
- --- a/Text/Wiki/Parse/Creole/Paragraph.php
- +++ b/Text/Wiki/Parse/Creole/Paragraph.php
- @@ -105,7 +105,7 @@ class Text_Wiki_Parse_Paragraph extends Text_Wiki_Parse {
- $key = '';
- $len = strlen($matches[0]);
- for ($i = 1; $i < $len; $i++) {
- - $char = $matches[0]{$i};
- + $char = $matches[0][$i];
- if ($char == $delim) {
- break;
- } else {
- diff --git a/Text/Wiki/Parse/Default/Smiley.php b/Text/Wiki/Parse/Default/Smiley.php
- index ce295b4..2e1d10b 100644
- --- a/Text/Wiki/Parse/Default/Smiley.php
- +++ b/Text/Wiki/Parse/Default/Smiley.php
- @@ -111,15 +111,15 @@ class Text_Wiki_Parse_Smiley extends Text_Wiki_Parse {
- $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, '#');
- }
- diff --git a/Text/Wiki/Parse/Default/Wikilink.php b/Text/Wiki/Parse/Default/Wikilink.php
- index 8a33e43..f0bafd1 100755
- --- a/Text/Wiki/Parse/Default/Wikilink.php
- +++ b/Text/Wiki/Parse/Default/Wikilink.php
- @@ -186,7 +186,7 @@ class Text_Wiki_Parse_Wikilink extends Text_Wiki_Parse {
- {
- // 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];
- }
-
- diff --git a/Text/Wiki/Parse/Doku/Paragraph.php b/Text/Wiki/Parse/Doku/Paragraph.php
- index 8a535ef..18c3acc 100644
- --- a/Text/Wiki/Parse/Doku/Paragraph.php
- +++ b/Text/Wiki/Parse/Doku/Paragraph.php
- @@ -112,7 +112,7 @@ class Text_Wiki_Parse_Paragraph extends Text_Wiki_Parse {
- $key = '';
- $len = strlen($matches[0]);
- for ($i = 1; $i < $len; $i++) {
- - $char = $matches[0]{$i};
- + $char = $matches[0][$i];
- if ($char == $delim) {
- break;
- } else {
- diff --git a/Text/Wiki/Parse/Mediawiki/Table.php b/Text/Wiki/Parse/Mediawiki/Table.php
- index 0622ae0..2150d47 100644
- --- a/Text/Wiki/Parse/Mediawiki/Table.php
- +++ b/Text/Wiki/Parse/Mediawiki/Table.php
- @@ -260,7 +260,7 @@ class Text_Wiki_Parse_Table extends Text_Wiki_Parse {
- }
- $param = array(
- 'type' => 'cell_start',
- - 'attr' => $matches[1] && ($matches[1]{0} == '!') ? 'header': null,
- + 'attr' => $matches[1] && ($matches[1][0] == '!') ? 'header': null,
- 'span' => 1,
- 'rowspan' => 1,
- 'order' => $order
- diff --git a/Text/Wiki/Parse/Tiki/Paragraph.php b/Text/Wiki/Parse/Tiki/Paragraph.php
- index 410d512..0441649 100755
- --- a/Text/Wiki/Parse/Tiki/Paragraph.php
- +++ b/Text/Wiki/Parse/Tiki/Paragraph.php
- @@ -114,7 +114,7 @@ class Text_Wiki_Parse_Paragraph extends Text_Wiki_Parse {
- $key = '';
- $len = strlen($matches[0]);
- for ($i = 1; $i < $len; $i++) {
- - $char = $matches[0]{$i};
- + $char = $matches[0][$i];
- if ($char == $delim) {
- break;
- } else {
- diff --git a/Text/Wiki/Parse/Tiki/Plugin.php b/Text/Wiki/Parse/Tiki/Plugin.php
- index e70c201..dd1f46c 100644
- --- a/Text/Wiki/Parse/Tiki/Plugin.php
- +++ b/Text/Wiki/Parse/Tiki/Plugin.php
- @@ -115,7 +115,7 @@ class Text_Wiki_Parse_Plugin extends Text_Wiki_Parse {
- preg_match_all($this->regexArgs, $matches[2], $args, PREG_PATTERN_ORDER);
- $attr = array();
- foreach ($args[1] as $i=>$name) {
- - if ($args[2][$i]{0} == '"' || $args[2][$i]{0} == "'") {
- + if ($args[2][$i][0] == '"' || $args[2][$i][0] == "'") {
- $attr[$name] = substr($args[2][$i], 1, -1);
- } else {
- $attr[$name] = trim($args[2][$i]);
- diff --git a/Text/Wiki/Parse/Tiki/Wikilink.php b/Text/Wiki/Parse/Tiki/Wikilink.php
- index 3cb279e..14d17b1 100755
- --- a/Text/Wiki/Parse/Tiki/Wikilink.php
- +++ b/Text/Wiki/Parse/Tiki/Wikilink.php
- @@ -195,7 +195,7 @@ class Text_Wiki_Parse_Wikilink extends Text_Wiki_Parse {
- {
- // when prefixed with !, it's explicitly not a wiki link.
- // return everything as it was.
- - /*if ($matches[3]{0} == '!') {
- + /*if ($matches[3][0] == '!') {
- return $matches[1] . substr($matches[3], 1) . $matches[4] . $matches[7];
- }*/
- if (isset($matches[2]) && $matches[2] == '))' && isset($matches[5]) && $matches[5] == '((') {
- diff --git a/Text/Wiki/Render/Docbook/Colortext.php b/Text/Wiki/Render/Docbook/Colortext.php
- index b0ed39f..7b49870 100644
- --- a/Text/Wiki/Render/Docbook/Colortext.php
- +++ b/Text/Wiki/Render/Docbook/Colortext.php
- @@ -70,7 +70,7 @@ class Text_Wiki_Render_Docbook_Colortext extends Text_Wiki_Render {
- $color = $options['color'];
-
- if (!in_array($color, $this->getConf('colors', array())) &&
- - $color{0} != '#') {
- + $color[0] != '#') {
- $color = '#' . $color;
- }
- return '<phrase role="' . $this->getConf('role', 'color') . '" ' .
- diff --git a/Text/Wiki/Render/Docbook/Url.php b/Text/Wiki/Render/Docbook/Url.php
- index 1c42f19..2e012c7 100644
- --- a/Text/Wiki/Render/Docbook/Url.php
- +++ b/Text/Wiki/Render/Docbook/Url.php
- @@ -77,7 +77,7 @@ class Text_Wiki_Render_Docbook_Url extends Text_Wiki_Render {
- } 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.
- diff --git a/Text/Wiki/Render/Xhtml/Colortext.php b/Text/Wiki/Render/Xhtml/Colortext.php
- index d0298ab..e93c4a0 100755
- --- a/Text/Wiki/Render/Xhtml/Colortext.php
- +++ b/Text/Wiki/Render/Xhtml/Colortext.php
- @@ -63,7 +63,7 @@ class Text_Wiki_Render_Xhtml_Colortext extends Text_Wiki_Render {
- $type = $options['type'];
- $color = $options['color'];
-
- - if (! in_array($color, $this->colors) && $color{0} != '#') {
- + if (! in_array($color, $this->colors) && $color[0] != '#') {
- $color = '#' . $color;
- }
-
- diff --git a/Text/Wiki/Render/Xhtml/Url.php b/Text/Wiki/Render/Xhtml/Url.php
- index 794ba16..576fa51 100755
- --- a/Text/Wiki/Render/Xhtml/Url.php
- +++ b/Text/Wiki/Render/Xhtml/Url.php
- @@ -79,7 +79,7 @@ class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render {
- } 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.