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.
Click "packing slip" from shipments tab and fatal error displays:
Fatal error: Cannot use object of type stdClass as array in /home/bsb/domains/bsb/public_html/includes/theme.inc on line 813
Have tested with 7.x-3.0-beta3 and 7.x-3.x-dev from Jun 8 and with Bartik and Seven themes.
Comments
Comment #1
longwaveComment #3
mcctnt2000 CreditAttribution: mcctnt2000 commentedSame Error when attempting to print a packing slip;
Fatal error: Cannot use object of type stdClass as array in /home/content/53/8013653/html/includes/theme.inc on line 813
When looking at the theme.inc file, starting on line 813 I have this:
// If a renderable array is passed as $variables, then set $variables to
// the arguments expected by the theme function.
if (isset($variables['#theme']) || isset($variables['#theme_wrappers'])) {
$element = $variables;
$variables = array();
if (isset($info['variables'])) {
foreach (array_keys($info['variables']) as $name) {
if (isset($element["#$name"])) {
$variables[$name] = $element["#$name"];
}
}
}
else {
$variables[$info['render element']] = $element;
}
}
I am using fusion with the Acquia Prosper theme.
Not sure what the problem is, any input would be greatly appreciated.
Comment #4
TR CreditAttribution: TR commented#1 indicates this was fixed. To get the fix you will have to use a -dev version dated after 10 June.
Comment #5
Adam Clarey CreditAttribution: Adam Clarey commentedIve just tried with beta4 and the latest dev and im still getting the same error above.
EDIT: My mistake, it was my code that was causing the error because it hadn't been updated to reflect the new changes.
Comment #6
Adam Clarey CreditAttribution: Adam Clarey commented