From 06f96f8f9bcb7f111013672ebadf93276c9bacba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 30 Mar 2012 15:49:32 +0200 Subject: [PATCH] Bug #1193: Fix onedb migrator 3.3.0_to_3.3.80.rb when IMAGE/SOURCE is empty (cherry picked from commit 3d347d024edc45e6b99c3c0a121062d7fae20961) --- src/onedb/3.3.0_to_3.3.80.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/onedb/3.3.0_to_3.3.80.rb b/src/onedb/3.3.0_to_3.3.80.rb index 3fd8ee4631..8d94203555 100644 --- a/src/onedb/3.3.0_to_3.3.80.rb +++ b/src/onedb/3.3.0_to_3.3.80.rb @@ -234,6 +234,11 @@ module Migrator # Update SOURCE doc.root.each_element("SOURCE") { |e| previous_source = e.text + + if previous_source.nil? + next + end + hash = previous_source.split('/')[-1] if ( hash.length == 32 && hash =~ /^[0-9A-F]+$/i )