Fix #241
This commit is contained in:
@@ -45,7 +45,11 @@ class CacheFileStore
|
||||
def write_entry(key, data_to_store, cache_ttl)
|
||||
if cache_ttl > 0
|
||||
File.open(get_entry_file_path(key), 'w') do |f|
|
||||
f.write(@serializer.dump(data_to_store))
|
||||
begin
|
||||
f.write(@serializer.dump(data_to_store))
|
||||
rescue
|
||||
nil # spec fix for "can't dump hash with default proc" when stub_request with response headers
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,8 +39,8 @@ class WpPlugins < WpItems
|
||||
wp_plugins = WpPlugins.new(wp_target)
|
||||
|
||||
if headers
|
||||
powered_by = headers['X-Powered-By']
|
||||
wp_super_cache = headers['wp-super-cache']
|
||||
powered_by = headers['X-Powered-By'].to_s
|
||||
wp_super_cache = headers['wp-super-cache'].to_s
|
||||
|
||||
if matches = /W3 Total Cache\/([0-9.]+)/i.match(powered_by)
|
||||
wp_plugins.add('w3-total-cache', version: matches[1])
|
||||
|
||||
Reference in New Issue
Block a user