Skip to content

Instantly share code, notes, and snippets.

View shirazd's full-sized avatar

Shiraz Dindar shirazd

View GitHub Profile
@shirazd
shirazd / gist:5093487
Last active December 14, 2015 13:28
display name: block
$view = new view();
$view->name = 'cis_communications';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'CIS Communications';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@shirazd
shirazd / feeds_empty_patch_over_patch.patch
Created June 8, 2012 02:19
patch to be applied over franz existing patch.
diff --git a/mappers/field.inc b/mappers/field.inc
index dd8978c..6c96108 100644
--- a/mappers/field.inc
+++ b/mappers/field.inc
@@ -111,7 +111,7 @@ function _field_feeds_set_target($source, $entity, $target, $value, $input_forma
$field = isset($entity->$target) ? $entity->$target : array();
foreach ($value as $v) {
// Check if field value is empty.
- if(empty($v[0])){
+ if ((is_array($v) && empty($v[0]) || (!is_array($v) && empty ($v)))) {