[Rt-commit] rt branch, 4.4/only-warn-once-about-unsafe-scrips-in-global-destruction, repushed
Dianne Skoll
dianne at bestpractical.com
Fri Oct 2 08:57:12 EDT 2020
The branch 4.4/only-warn-once-about-unsafe-scrips-in-global-destruction was deleted and repushed:
was e8c211180e70b177d9dfb9eff03bf3382bc59291
now ba690659821488b78a9bcb494ea7cfdaa9a77963
1: e8c211180e ! 1: ba69065982 Issue the "Too late to safely run transaction-batch scrips!" warning at most once.
@@ -4,6 +4,9 @@
If it's issued dozens/hundreds/thousands of times, it could hide the real
error if invoked from a command-line script whose output is not captured.
+
+ (Note, however, that if DevelMode is configured, we do not suppress
+ repeated warnings.)
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
--- a/lib/RT/Ticket.pm
@@ -35,7 +38,10 @@
." at the top-level of a script which uses the RT API."
." Be sure to explicitly undef such ticket objects,"
." or put them inside of a lexical scope.";
-+ $warned = 1;
++ # Do not suppress repeated warnings if we are in DevelMode
++ unless (RT->Config->Get('DevelMode')) {
++ $warned = 1;
++ }
}
return;
}
More information about the rt-commit
mailing list