diff --git a/includes/views_customfield_handler_field_phpcode.inc b/includes/views_customfield_handler_field_phpcode.inc
index c484384..14a0132 100644
--- a/includes/views_customfield_handler_field_phpcode.inc
+++ b/includes/views_customfield_handler_field_phpcode.inc
@@ -17,11 +17,11 @@ define('VIEWS_CUSTOMFIELD_SORTABLE_NAT_NOCASE', 5);
 
 class views_customfield_handler_field_phpcode extends views_handler_field {
   var $static;
-  
+
   function query() {
     $this->field_alias = 'customfield_phpcode_'. $this->position;
   }
-  
+
   function option_definition() {
     $options = parent::option_definition();
     $options['value'] = array('default' => '');
@@ -39,7 +39,7 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
       '#title' => t('Value'),
       '#default_value' => $this->options['value'],
       '#rows' => 5,
-      '#description' => 
+      '#description' =>
         t('The text that should be displayed.')
         .' '.t('Include &lt;?php ?&gt; delimiters when using PHP code.')
         .' '.t('Available variables:').'<br/>'
@@ -85,7 +85,7 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
     foreach ($this->view->result as $i => $row) {
       $this->view->result[$i]->{$this->field_alias} = $this->render_row($row);
     }
-    
+
     // If we're sorting, do the actual sorting then fix the results as per the pager info.
     if ($this->options['sortable'] != VIEWS_CUSTOMFIELD_SORTABLE_NO && $this->sort_order) {
       usort($this->view->result, array(new views_customfield_sorter($this->options['sortable'], $this->sort_order, $this->field_alias), 'sort'));
@@ -123,7 +123,7 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
         $results = array_slice($this->view->result, $offset, $this->pager['items_per_page']);
         $this->view->result = $results;
       }
-      
+
       $this->view->pager = $this->pager;
     }
   }
@@ -143,7 +143,8 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
     $field_handlers = $d->handler->handlers['field'];
     foreach ($field_handlers as $h) {
       // Handle grouped fields
-      if (is_a($h, 'content_handler_field_multiple') && $h->defer_query) {
+      $name = 'content_handler_field_multiple';
+      if ($h instanceof $name && $h->defer_query) {
         // content_handler_field_multiple stores its query results in $obj->field_values
         $tmp = array();
         if(!empty($h->field_values[$values->{$h->field_alias}])) {
@@ -157,13 +158,13 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
         $values->{$h->table.'_'.$h->field} = $tmp;
       }
     }
-    
+
     return $this->render_phpcode($this->options['value'], $this->static, $values);
   }
 
   /**
    * Prepare and evaluate of a string of PHP code.
-   * 
+   *
    * This method and eval_phpcode are mostly a copy of drupal_eval().
    *
    * @param string $code
@@ -173,10 +174,10 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
    */
   function render_phpcode($code, &$static, $data) {
     global $theme_path, $theme_info, $conf;
-  
+
     // Store current theme path.
     $old_theme_path = $theme_path;
-  
+
     // Restore theme_path to the theme, as long as drupal_eval() executes,
     // so code evaluted will not see the caller module as the current theme.
     // If theme info is not initialized get the path from theme_default.
@@ -186,12 +187,12 @@ class views_customfield_handler_field_phpcode extends views_handler_field {
     else {
       $theme_path = dirname($theme_info->filename);
     }
-  
+
     $output = $this->eval_phpcode($code, $static, $data);
-  
+
     // Recover original theme path.
     $theme_path = $old_theme_path;
-  
+
     return $output;
   }
 
diff --git a/views_customfield.module b/views_customfield.module
index b918dad..5bc22bc 100644
--- a/views_customfield.module
+++ b/views_customfield.module
@@ -14,7 +14,8 @@ function views_customfield_views_pre_execute(&$view) {
   $d = $view->display[$view->current_display];
   $field_handlers = $d->handler->handlers['field'];
   foreach ($field_handlers as $h) {
-    if (is_a($h, 'views_customfield_handler_field_phpcode')) {
+    $v = 'views_customfield_handler_field_phpcode';
+    if ($h instanceof $v) {
       $h->pre_execute();
     }
   }
