From 2e6347a2f1b3f01a199b2c28d63454cbde197200 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 27 Mar 2012 22:36:41 +0000 Subject: [PATCH] pdf: backport r8731 (#10505) Fixed that tag[0] may be nil. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9278 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- vendor/plugins/rfpdf/lib/tcpdf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/plugins/rfpdf/lib/tcpdf.rb b/vendor/plugins/rfpdf/lib/tcpdf.rb index 9f7fa1bb7..5ff5cd30f 100755 --- a/vendor/plugins/rfpdf/lib/tcpdf.rb +++ b/vendor/plugins/rfpdf/lib/tcpdf.rb @@ -3474,7 +3474,7 @@ class TCPDF #Extract attributes # get tag name tag = element.scan(/([a-zA-Z0-9]*)/).flatten.delete_if {|x| x.length == 0} - tag = tag[0].downcase; + tag = tag[0].to_s.downcase; # get attributes attr_array = element.scan(/([^=\s]*)=["\']?([^"\']*)["\']?/) @@ -3497,7 +3497,7 @@ class TCPDF #Extract attributes # get tag name tag = element.scan(/([a-zA-Z0-9]*)/).flatten.delete_if {|x| x.length == 0} - tag = tag[0].downcase; + tag = tag[0].to_s.downcase; # get attributes attr_array = element.scan(/([^=\s]*)=["\']?([^"\']*)["\']?/) -- 2.39.5