Index: customerror.module
===================================================================
--- customerror.module	(revision 498)
+++ customerror.module	(working copy)
@@ -78,6 +78,12 @@
       '#rows' => 10,
       '#description' => t('This text will be displayed if a ' . $error_code . '('. $error_desc . ') error occurs.')
     );
+    $form['customerror_' . $error_code . '_php'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Allow PHP code to be executed for ') . $error_code,
+      '#default_value' => variable_get('customerror_' . $error_code . '_php', FALSE),
+      '#description' => t('This allows you to include PHP code (inside &lt;php ?&gt; tags) for the ' . $error_code . '('. $error_desc . ') error message.')
+    );
   }
 
   return $form;
@@ -112,6 +118,7 @@
         _customerror_fetch_error($error)));
       $output = theme('customerror_' . $error,
         variable_get('customerror_' . $error, _customerror_fetch_error($error)));
+      variable_get('customerror_' . $error . '_php', FALSE) ? $output = drupal_eval($output) : $output = $output;
       break;
     default:
       drupal_set_title(t('undefined error: ') . $error);
