Skip to content

Commit

Permalink
Issue #2812: Fixed error handling of yaml string in AdminDynamicField…
Browse files Browse the repository at this point in the history
…Set.
  • Loading branch information
stefanhaerter committed Jan 11, 2024
1 parent 8d614e9 commit fab3d63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Kernel/Modules/AdminDynamicFieldSet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# OTOBO is a web-based ticketing system for service organisations.
# --
# Copyright (C) 2001-2020 OTRS AG, https://otrs.com/
# Copyright (C) 2019-2023 Rother OSS GmbH, https://otobo.de/
# Copyright (C) 2019-2024 Rother OSS GmbH, https://otobo.de/
# --
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -442,7 +442,7 @@ sub _ChangeAction {
my $DynamicField = $DynamicFieldObject->DynamicFieldGet(
Name => $Line->{DF},
);
if ( !$DynamicField ) {
if ( !IsHashRefWithData($DynamicField) ) {
$Errors{IncludeServerError} = 'ServerError';
$Errors{IncludeServerErrorMessage} = Translatable( 'No dynamic field "' . $Line->{DF} . '".' );

Expand Down Expand Up @@ -832,7 +832,7 @@ sub _ShowScreen {
if ( !$Param{Include} && $FieldConfig->{Include} ) {
$Param{Include} = $FieldConfig->{Include};
}
if ( $Param{Include} ) {
if ( IsArrayRefWithData( $Param{Include} ) ) {
$Param{Include} = $Kernel::OM->Get('Kernel::System::YAML')->Dump(
Data => $Param{Include},
);
Expand Down

0 comments on commit fab3d63

Please sign in to comment.