From 83e7619b80308adcb5417a36e81965307700a10a Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <eric@unl.edu>
Date: Mon, 2 Apr 2012 15:44:20 +0000
Subject: [PATCH] [gh-306] Merging test into staging -c1495

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1496 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/unl/unl.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module
index ea3a526e..84cc9aed 100644
--- a/sites/all/modules/unl/unl.module
+++ b/sites/all/modules/unl/unl.module
@@ -261,7 +261,7 @@ function unl_element_info_alter(&$type) {
  */
 function unl_filter_process_format($element) {
   // Only remove the plain_text and filtered_html options on the node edit form. They need to be available on comment forms, etc.
-  if ($element['#entity_type'] == 'node') {
+  if (isset($element['#entity_type']) && $element['#entity_type'] == 'node') {
     unset($element['format']['format']['#options']['plain_text']);
     unset($element['format']['format']['#options'][1]); // On production the machine names are integers
     unset($element['format']['format']['#options']['filtered_html']);
-- 
GitLab