[Rt-commit] rt branch, 4.4/vsplit-uninitialized-warning-fix, created. rt-4.4.3-39-g67aac127c
? sunnavy
sunnavy at bestpractical.com
Thu Aug 30 12:05:36 EDT 2018
The branch, 4.4/vsplit-uninitialized-warning-fix has been created
at 67aac127cacf1f91161ffea5e8d019676f2f97cd (commit)
- Log -----------------------------------------------------------------
commit 67aac127cacf1f91161ffea5e8d019676f2f97cd
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Aug 31 00:03:08 2018 +0800
Fix the uninitialized warning in vsplit when the passed value is undef
diff --git a/lib/RT/Interface/REST.pm b/lib/RT/Interface/REST.pm
index 3a4628593..d0ebec71f 100644
--- a/lib/RT/Interface/REST.pm
+++ b/lib/RT/Interface/REST.pm
@@ -284,6 +284,8 @@ sub vpush {
# "Normalise" a hash key that's known to be multi-valued.
sub vsplit {
my ($val, $strip) = @_;
+ return [] unless defined $val;
+
my @words;
my @values = map {split /\n/} (ref $val eq 'ARRAY' ? @$val : $val);
-----------------------------------------------------------------------
More information about the rt-commit
mailing list