Skip to content

Commit

Permalink
fix php8 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
joequant committed Dec 13, 2020
1 parent d6262be commit c524da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function render($mode, Doku_Renderer $renderer, $data) {
// output
$renderer->header($title.$path, 5, $data[2]);
$renderer->section_open(5);
if ($url{strlen($url) - 1} == '/') { // directory
if ($url[strlen($url) - 1] == '/') { // directory
$this->_directory($base, $renderer, $path, $data[3]);
} elseif (preg_match('/(jpe?g|gif|png)$/i', $url)) { // image
$this->_image($url, $renderer);
Expand Down Expand Up @@ -131,7 +131,7 @@ function _index($url, $path, $base = '', $lvl = 0) {
foreach ($results[1] as $result) {
if ($result == '../') continue;

$type = ($result{strlen($result) - 1} == '/' ? 'd' : 'f');
$type = ($result[strlen($result) - 1] == '/' ? 'd' : 'f');
$open = (($type == 'd') && (strpos($path, $base.$result) === 0));
$items[] = array(
'level' => $lvl,
Expand Down

0 comments on commit c524da3

Please sign in to comment.