Skip to content

Commit

Permalink
Issue #1182296 by BTMash, matason, catch, xjm: Add tests for 7.0->7.x…
Browse files Browse the repository at this point in the history
… upgrade path.
  • Loading branch information
webchick committed Nov 24, 2011
1 parent 3b01378 commit 730f77f
Show file tree
Hide file tree
Showing 8 changed files with 816 additions and 15 deletions.
7 changes: 7 additions & 0 deletions includes/utility.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ function drupal_var_export($var, $prefix = '') {
$output = "'" . $var . "'";
}
}
elseif (is_object($var) && get_class($var) === 'stdClass') {
// var_export() will export stdClass objects using an undefined
// magic method __set_state() leaving the export broken. This
// workaround avoids this by casting the object as an array for
// export and casting it back to an object when evaluated.
$output .= '(object) ' . drupal_var_export((array) $var, $prefix);
}
else {
$output = var_export($var, TRUE);
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 730f77f

Please sign in to comment.