Permalink
Browse files

MINOR Using instanceof rather than is_a in CheckboxSetField

  • Loading branch information...
1 parent e31851b commit eb5716f471008f4f5ac0ca959bdf4e3f2f03beaa @chillu chillu committed Jan 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 forms/CheckboxSetField.php
@@ -85,7 +85,7 @@ function Field($properties = array()) {
}
} else {
// Sometimes we pass a singluar default value thats ! an array && !SS_List
- if(is_a($values, 'SS_List') || is_array($values)) {
+ if($values instanceof SS_List || is_array($values)) {
$items = $values;
} else {
$items = explode(',', $values);
@@ -245,7 +245,7 @@ function performReadonlyTransformation() {
if($items) {
// Items is a DO Set
- if(is_a($items, 'SS_List')) {
+ if($items instanceof SS_List) {
foreach($items as $item) {
$data[] = $item->Title;
}

0 comments on commit eb5716f

Please sign in to comment.