[Rt-commit] rt branch, 4.2/zero-attachments-in-forward-txns, created. rt-4.2.10-238-g786842c
? sunnavy
sunnavy at bestpractical.com
Mon Apr 27 09:20:10 EDT 2015
The branch, 4.2/zero-attachments-in-forward-txns has been created
at 786842cd37f7594823f232d01632b10adf9da3b3 (commit)
- Log -----------------------------------------------------------------
commit 786842cd37f7594823f232d01632b10adf9da3b3
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Apr 27 21:01:21 2015 +0800
make sure $att is defined before calling it
it's kinda weird that forward txns don't have any attachments, but shit happens
in real life, let's 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