Commit 456259fd authored by Pietro Saccardi's avatar Pietro Saccardi

Bugfix: subexpr was returning an array instead of its element.

parent c2799b0d
Pipeline #436 passed with stage
in 3 minutes and 9 seconds
......@@ -204,7 +204,7 @@ class general_plugin_ifauthex_test extends DokuWikiTest
public function test_output() {
$info = array();
$instructions = p_get_instructions('<ifauth nonexistent>hideme</ifauth><ifauth !nonexistent>showme</ifauth>');
$instructions = p_get_instructions('<ifauth (nonexistent)>hideme</ifauth><ifauth !(nonexistent)>showme</ifauth>');
$xhtml = p_render('xhtml', $instructions, $info);
$this->assertTrue(stristr($xhtml, 'showme') !== false);
$this->assertTrue(stristr($xhtml, 'hideme') === false);
......
......@@ -37,7 +37,7 @@ class SubExpr extends ElementDefinition {
}
}
public function _evaluateWellFormed($elmInstance) {
return $elmInstance->evaluateArgs();
return $elmInstance->evaluateArgs()[0];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment