Skip to content
Snippets Groups Projects
Commit a1bba472 authored by Christophe Battarel's avatar Christophe Battarel
Browse files

FIX: hook insertExtraFields must return a returnvalue (0,1,-1)

parent d0dc792b
No related branches found
No related tags found
No related merge requests found
...@@ -131,6 +131,7 @@ class HookManager ...@@ -131,6 +131,7 @@ class HookManager
// Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated. // Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated.
$hooktype='output'; $hooktype='output';
if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win. if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win.
if ($method =='insertExtraFields') $hooktype='returnvalue';
if (in_array( if (in_array(
$method, $method,
array( array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment