[Rt-commit] rt branch, 4.2/zero-attachments-in-forward-txns, created. rt-4.2.10-238-g5c774cb

? sunnavy sunnavy at bestpractical.com
Mon Apr 27 12:50:12 EDT 2015


The branch, 4.2/zero-attachments-in-forward-txns has been created
        at  5c774cbcbea241163f7f004835275e0364844d08 (commit)

- Log -----------------------------------------------------------------
commit 5c774cbcbea241163f7f004835275e0364844d08
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Apr 27 21:01:21 2015 +0800

    make sure $att is defined before calling it
    
    forward txns before RT 4.2 don't have any attachments, we need to get around
    it with more conservative code.  (thanks cloos++)

diff --git a/etc/upgrade/4.2.11/content b/etc/upgrade/4.2.11/content
index 8c40d37..5e43db7 100644
--- a/etc/upgrade/4.2.11/content
+++ b/etc/upgrade/4.2.11/content
@@ -44,6 +44,7 @@ EOSQL
         $txns->Limit( FIELD => 'Type', VALUE => 'Forward Ticket' );
         while ( my $txn = $txns->Next ) {
             my $att = $txn->Attachments->First;
+            next unless $att;
 
             # we only need to process ascii-only strings
             unless ( $att->Subject =~ /[^\x00-\x7F]/ ) {

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


More information about the rt-commit mailing list