Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fallback for new section editing. fixes #2311
The displayed message now shows the target that was passed, which should
help identifying the troubling plugin.

Instead of failing, we fix the data ourselves - this code will be
removed in the future.
  • Loading branch information
splitbrain committed Apr 14, 2018
1 parent 75c3272 commit ac025fd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions inc/parser/xhtml.php
Expand Up @@ -77,8 +77,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*/
public function startSectionEdit($start, $data) {
if (!is_array($data)) {
msg('startSectionEdit: $data is NOT an array!', -1);
return '';
msg(
sprintf(
'startSectionEdit: $data "%s" is NOT an array! One of your plugins needs an update.',
hsc((string) $data)
), -1
);

// @deprecated 2018-04-14, backward compatibility
$args = func_get_args();
$data = array();
if(isset($args[1])) $data['target'] = $args[1];
if(isset($args[2])) $data['name'] = $args[2];
if(isset($args[3])) $data['hid'] = $args[3];
}
$data['secid'] = ++$this->lastsecid;
$data['start'] = $start;
Expand Down

0 comments on commit ac025fd

Please sign in to comment.