Skip to content

Commit

Permalink
Fix Array to string conversion warning
Browse files Browse the repository at this point in the history
Regression introduced by incorrect implementation of newpagevars in
commit 0d90564 when porting #66 - It
should be a string, not an array.
  • Loading branch information
dregad committed Sep 24, 2023
1 parent 649d5fc commit 6aca7de
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 @@ -74,7 +74,7 @@ public function handle($match, $state, $pos, Doku_Handler $handler) {
$data = array(
'namespace' => '',
'newpagetemplates' => array(),
'newpagevars' => array(),
'newpagevars' => '',
'options' => array(
'exclude' => $this->getConf('addpage_exclude'),
'showroot' => $this->getConf('addpage_showroot'),
Expand All @@ -90,7 +90,7 @@ public function handle($match, $state, $pos, Doku_Handler $handler) {

if(preg_match('/#(.*?)(#.*?)?(\?|$)/', $match, $m)) {
$data['newpagetemplates'] = array_map('trim', explode(',', $m[1]));
$data['newpagevars'] = array_map('trim', explode(',', $m[2]));
$data['newpagevars'] = trim($m[2]);
}

if(preg_match('/\?(.*?)(#|$)/', $match, $m)) {
Expand Down

0 comments on commit 6aca7de

Please sign in to comment.