summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc')
-rw-r--r--kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc b/kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc
index e5857d8..ab36ca9 100644
--- a/kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc
+++ b/kolab.org/www/drupal-7.26/sites/all/modules/ctools/plugins/access/entity_field_value.inc
@@ -139,6 +139,12 @@ function ctools_entity_field_value_ctools_access_settings_submit($form, &$form_s
* Check for access.
*/
function ctools_entity_field_value_ctools_access_check($conf, $context, $plugin) {
+ if (!isset($context->data)) {
+ // If the context doesn't exist -- for example, a newly added entity
+ // reference is used as a pane visibility criteria -- we deny access.
+ return FALSE;
+ }
+
list($parent, $entity_type, $bundle_type, $field_name) = explode(':', $plugin['name']);
if ($field_items = field_get_items($entity_type, $context->data, $field_name)) {