From 3e5f80b0e36375a68cdb08b5b57fbc12cd85f7f1 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 6 Dec 2016 14:05:19 +0100 Subject: [PATCH] Follow up: Pull request #497 - Added check for extract_numbers parameter. --- app/models/cti/caller_id.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/cti/caller_id.rb b/app/models/cti/caller_id.rb index 561712a19..dc09c98a1 100644 --- a/app/models/cti/caller_id.rb +++ b/app/models/cti/caller_id.rb @@ -178,6 +178,7 @@ returns def self.extract_numbers(text) # see specs for example + return [] if !text.is_a?(String) text.scan(/([\d|\s|\-|\(|\)]{6,26})/).map do |match| normalize_number(match[0]) end