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
This commit is contained in:
parent
8a2a17b8eb
commit
2e6347a2f1
4
vendor/plugins/rfpdf/lib/tcpdf.rb
vendored
4
vendor/plugins/rfpdf/lib/tcpdf.rb
vendored
@ -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]*)=["\']?([^"\']*)["\']?/)
|
||||
|
Loading…
x
Reference in New Issue
Block a user