Commit 040e98ed authored by Timmer, Marius's avatar Timmer, Marius

Bugfix: Create the AgentTicketPrint package without the object manager and let...

Bugfix: Create the AgentTicketPrint package without the object manager and let the object manager always create a new instance of the PDF package.
parent 9724fa53
......@@ -199,8 +199,15 @@ sub CreatePDF {
UserID => $Self->{UserID}
);
# Just call a new instance of our modified version of the pdf printer
my $TicketPrinter = $Kernel::OM->Get('Kernel::Modules::AgentTicketPrint');
# The AgentTicketPrint module can not be loaded using the object manager
# which is why we do it the oldschool way. Before we create the module we
# have to tell the object manager that the PDF package must not be cached.
# Using one PDF package instance for multiple pdf files causes a crash after
# the first pdf file is created.
$Kernel::OM->ObjectsDiscard(
Objects => ['Kernel::System::PDF']
);
my $TicketPrinter = Kernel::Modules::AgentTicketPrint->new();
$TicketPrinter->{TicketID} = $Param{TicketID};
$TicketPrinter->{UserID} = $RootUserData{UserID};
$TicketPrinter->{UserFirstname} = $RootUserData{UserFirstname};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment