Fixes #4605 -- only try to yield if we have a block to yield to.

git-svn-id: file:///home/svn/framework3/trunk@12762 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2011-05-29 03:00:13 +00:00
parent cf002b6b68
commit e85a350257
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ module Rex
return unless @report_data[:vuln][:matches].kind_of? Array
refs = normalize_references(@report_data[:vuln][:refs])
refs << "NEXPOSE-#{report_data[:vuln]["id"]}"
db.emit(:vuln, [refs.last,@report_data[:vuln][:matches].size], &block)
vuln_instances = @report_data[:vuln][:matches].size
db.emit(:vuln, [refs.last,vuln_instances], &block) if block
data = {
:workspace => @args[:wspace],
:name => refs.last,