[Rt-commit] r13344 - rt/3.8/trunk/lib/RT/Graph

ruz at bestpractical.com ruz at bestpractical.com
Mon Jun 16 19:15:18 EDT 2008


Author: ruz
Date: Mon Jun 16 19:15:17 2008
New Revision: 13344

Modified:
   rt/3.8/trunk/lib/RT/Graph/Tickets.pm

Log:
* add error handling when there is no property callback defined
  for graphs and FillUsing argument

Modified: rt/3.8/trunk/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Graph/Tickets.pm	(original)
+++ rt/3.8/trunk/lib/RT/Graph/Tickets.pm	Mon Jun 16 19:15:17 2008
@@ -239,7 +239,12 @@
     
     if ( $args{'FillUsing'} ) {
         my ($key, @subkeys) = $self->_SplitProperty( $args{'FillUsing'} );
-        my $value = $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
+        my $value;
+        if ( $property_cb{ $key } ) {
+            $value = $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
+        } else {
+            $RT::Logger->error("Couldn't find property callback for '$key'");
+        }
         if ( defined $value && length $value && $value =~ /\S/ ) {
             my $fill = $fill_cache{ $value };
             $fill = $fill_cache{ $value } = shift @available_colors


More information about the Rt-commit mailing list