Skip to content

Commit

Permalink
Make php8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
atisne committed Jun 23, 2023
1 parent ce96249 commit 0c13c43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion action.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function register(Doku_Event_Handler $controller) {
}

function _renderer_content_postprocess(&$event, $param) {
if ($_GET['do'] !== 'export_revealjs' && $this->getConf('revealjs_active')) {
if (isset($_GET['do']) && $_GET['do'] !== 'export_revealjs' && $this->getConf('revealjs_active')) {
/* close last edit section correctly (missing </div>), because we close sections
only when a new one is opened - and this logic fails for the last section in the
document */
Expand Down
2 changes: 1 addition & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function _highlight($type, $text, $language = null, $filename = null, $options =
$this->doc .= '</a></dt>'.DOKU_LF.'<dd>';
}

if($text{0} == "\n") {
if($text[0] == "\n") {
$text = substr($text, 1);
}
if(substr($text, -1) == "\n") {
Expand Down
2 changes: 1 addition & 1 deletion syntax/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function handle($match, $state, $pos, Doku_Handler $handler) {
$level = 7 - strspn($title,'=');
if($level < 1) $level = 1;
$title = trim($title,'= ');
if ($this->getConf('revealjs_active') || $_GET['do']=='export_revealjs') {
if ($this->getConf('revealjs_active') || (isset($_GET['do']) && $_GET['do']=='export_revealjs')) {
/* We are now on a reveal.js activated page and we want to do our
own section handling to be able to get all relevant content from
one slide into one edit section. Since sections are header driven,
Expand Down

0 comments on commit 0c13c43

Please sign in to comment.