Changeset 117636 in spip-zone


Ignore:
Timestamp:
Aug 26, 2019, 9:17:46 AM (6 months ago)
Author:
marcimat@…
Message:

Tiket #4348 / Compat PHP 7.4 : Array and string offset access syntax with curly braces is deprecated

Location:
_core_/plugins/safehtml/lib/safehtml/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/safehtml/lib/safehtml/classes/HTMLSax3.php

    r93104 r117636  
    6969 function scanCharacter() {
    7070  if ($this->position < $this->length) {
    71    return $this->rawtext{$this->position++};
     71   return $this->rawtext[$this->position++];
    7272  }
    7373 }
     
    167167 function scanUntilCharacters($string) {
    168168  $startpos = $this->position;
    169   while ($this->position < $this->length && strpos($string, $this->rawtext{$this->position}) === FALSE) {
     169  while ($this->position < $this->length && strpos($string, $this->rawtext[$this->position]) === FALSE) {
    170170   $this->position++;
    171171  }
     
    175175 function ignoreWhitespace() {
    176176  while ($this->position < $this->length &&
    177    strpos(" \n\r\t", $this->rawtext{$this->position}) !== FALSE) {
     177   strpos(" \n\r\t", $this->rawtext[$this->position]) !== FALSE) {
    178178   $this->position++;
    179179  }
  • _core_/plugins/safehtml/lib/safehtml/classes/safehtml.php

    r111709 r117636  
    286286            $preg = "/[\s\x01-\x1F]*";
    287287            for ($i=0; $i<strlen($proto); $i++) {
    288                 $preg .= $proto{$i} . "[\s\x01-\x1F]*";
     288                $preg .= $proto[$i] . "[\s\x01-\x1F]*";
    289289            }
    290290            $preg .= ":/i";
Note: See TracChangeset for help on using the changeset viewer.