Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#6. #1423460: [META] List of bugs and typos in Drupal core found by Spleshka
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);
}
Comment | File | Size | Author |
---|---|---|---|
drupal_var_export-D8.patch | 625 bytes | droplet | |
drupal_var_export-D7.patch | 605 bytes | droplet | |
Comments
Comment #1
tstoecklerYup! Let's do this.
Comment #2
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x. Thanks.
Comment #3
tim.plunkettI can't fix the commit message, but I can fix the issue title!