[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-122-gc0ba2a3

Ruslan Zakirov ruz at bestpractical.com
Mon Sep 14 21:11:15 EDT 2009


The branch, 3.8-trunk has been updated
       via  c0ba2a35099a35194407b191370b86e7547e8c85 (commit)
      from  5a58f47d417d0ade3cef349477352adaf97c86de (commit)

Summary of changes:
 lib/RT/CustomField_Overlay.pm |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit c0ba2a35099a35194407b191370b86e7547e8c85
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Sep 12 19:27:45 2009 +0400

    check argument, helps debug problems

diff --git a/lib/RT/CustomField_Overlay.pm b/lib/RT/CustomField_Overlay.pm
index 7632795..e822236 100755
--- a/lib/RT/CustomField_Overlay.pm
+++ b/lib/RT/CustomField_Overlay.pm
@@ -312,6 +312,11 @@ sub LoadByName {
         @_,
     );
 
+    unless ( defined $args{'Name'} && length $args{'Name'} ) {
+        $RT::Logger->error("Couldn't load Custom Field without Name");
+        return wantarray ? (0, $self->loc("No name provided")) : 0;
+    }
+
     # if we're looking for a queue by name, make it a number
     if ( defined $args{'Queue'} && $args{'Queue'} =~ /\D/ ) {
         my $QueueObj = RT::Queue->new( $self->CurrentUser );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list