set error msg only if not already set

This commit is contained in:
Uwe Steinmann 2017-06-13 14:40:17 +02:00
parent dc58e02d25
commit 7a1c4b495c

View File

@ -29,7 +29,8 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common {
/* Call preUpdateDocument early, because it might need to modify some /* Call preUpdateDocument early, because it might need to modify some
* of the parameters. * of the parameters.
*/ */
if(false === $this->callHook('preUpdateDocument')) { if(false === $this->callHook('preUpdateDocument', $this->params['document'])) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preUpdateDocument_failed'; $this->errormsg = 'hook_preUpdateDocument_failed';
return null; return null;
} }