From d7f1e899ba13a678a5d6f0c21924bada0fa88008 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 14 Mar 2025 17:32:36 +0100 Subject: [PATCH] fix nasty error when validating attribute in a hook --- op/op.CheckInDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php index b5a250ed5..4ae63cbce 100644 --- a/op/op.CheckInDocument.php +++ b/op/op.CheckInDocument.php @@ -249,8 +249,8 @@ default: if(isset($_POST["attributes_version"]) && $_POST["attributes_version"]) { $attributes = $_POST["attributes_version"]; foreach($attributes as $attrdefid=>$attribute) { - if(null === ($ret = $controller->callHook('validateAttribute', $attrdef, $attribute))) { $attrdef = $dms->getAttributeDefinition($attrdefid); + if(null === ($ret = $controller->callHook('validateAttribute', $attrdef, $attribute))) { if($attribute) { switch($attrdef->getType()) { case SeedDMS_Core_AttributeDefinition::type_date: