[otrs-cvs] ITSMChangeManagement/Kernel/System/ITSMChange/Template ITSMChange.pm, 1.10, 1.11

"CVS commits notifications of OTRS.org" <[email protected]> Mon, 22 Apr 2013 20:31:39 +0000
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/ITSMChangeManagement/Kernel/System/ITSMChange/Template
In directory lancelot:/tmp/cvs-serv24746/Kernel/System/ITSMChange/Template

Modified Files:
	ITSMChange.pm 
Log Message:
Improved error handling when creating a change from a template.

Author: ub

Index: ITSMChange.pm
===================================================================
RCS file: /home/cvs/ITSMChangeManagement/Kernel/System/ITSMChange/Template/ITSMChange.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -2 -u -d -r1.10 -r1.11
--- ITSMChange.pm	21 Dec 2011 13:32:52 -0000	1.10
+++ ITSMChange.pm	22 Apr 2013 20:31:34 -0000	1.11
@@ -1,5 +1,5 @@
 # --
 # Kernel/System/ITSMChange/Template/ITSMChange.pm - all template functions for changes
-# Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -432,4 +432,13 @@
     );
 
+    # error handling
+    if ( !$ChangeID ) {
+        $Self->{LogObject}->Log(
+            Priority => 'error',
+            Message  => "Could not create change!",
+        );
+        return;
+    }
+
     my %Info = (
         ID             => $ChangeID,
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log