[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-237-gbef216f
    Kevin Falcone 
    falcone at bestpractical.com
       
    Tue Dec 28 12:39:09 EST 2010
    
    
  
The branch, 3.8-trunk has been updated
       via  bef216fc7dad54487d43d83954c8a30cd6fb126a (commit)
      from  4069372f8de3563e0a11bd47be722678bd1c01cf (commit)
Summary of changes:
 lib/RT.pm.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit bef216fc7dad54487d43d83954c8a30cd6fb126a
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Dec 28 11:59:33 2010 -0500
    Log an error, but don't die when there are invalid Scrips
    
    This caused RT to refuse to start if you had picked an invalid
    ScripAction or ScripCondition in an earlier release of RT (such as '-')
    before we started blocking that in the UI.  Also, if you installed a
    plugin that created a Scrip and then disabled the plugin, RT would
    refuse to start.
diff --git a/lib/RT.pm.in b/lib/RT.pm.in
index 3d2fa7e..dc5985e 100755
--- a/lib/RT.pm.in
+++ b/lib/RT.pm.in
@@ -484,7 +484,10 @@ sub InitClasses {
         my $scrips = RT::Scrips->new($RT::SystemUser);
         $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
         while ( my $scrip = $scrips->Next ) {
-            $scrip->LoadModules;
+            local $@;
+            eval { $scrip->LoadModules } or
+                $RT::Logger->error("Invalid Scrip ".$scrip->Id.".  Unable to load the Action or Condition.  ".
+                                   "You should delete or repair this Scrip in the admin UI.\n$@\n");
         }
 
 	foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) {
-----------------------------------------------------------------------
    
    
More information about the Rt-commit
mailing list