This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find last commit for the deleted file | |
git rev-list -n 1 HEAD -- $path | |
# Checkout the commit before the the delete happened | |
git checkout $commit^ -- $path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$field_collection_item = field_collection_item_load($id); | |
$item_wrapper = entity_metadata_wrapper('field_collection_item', $field_collection_item); | |
// this results in an error if the field_contrib_headshot field is empty | |
$headshot = $item_wrapper->field_contributor->field_contrib_headshot->value(); | |
Solution: | |
// EntityStructureWrapper implements the __isset() function according the principe of Overloading. | |
$headshot = array(); |
NewerOlder