Commit 24bd859c authored by ram4nd's avatar ram4nd
Browse files

Do not overwrite cache when locations file is unavailable.

parent 1832b3ca
......@@ -18,7 +18,9 @@ function commerce_omniva_locations() {
$data[$row_array[0]] = array_combine($keys, $row_array);
}
cache_set('commerce_omniva_locations_data', $data, 'cache');
if (!empty($data)) {
cache_set('commerce_omniva_locations_data', $data, 'cache');
}
}
}
return $data;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment