Fatal error: Cannot use string offset as an array in radix/template.php on line 77 in radix_preprocess_page.

I only received this logging out and trying to log back in.

The array looks like this:
$link[0] = 'authcache_ensure_element_cacheable';

I added an isset($link['#link']) prior to the assignment, but maybe this is not correct. Action links as buttons are still working.

Patch attached, but maybe this is actually an Authcache issue. Works for me for now, thanks again for everything!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jason.fisher’s picture

Status: Active » Needs review
barraponto’s picture

Well, you seem to have made the error go away, but does the link work?

znerol’s picture

The correct way to iterate through render arrays is to use element_children. This function will ignore properties (i.e. keys starting with #).

barraponto’s picture

Following @znerol's suggestion, I'm using element children to iterate.
@jason.fisher can you check it fixes your issue?

shadcn’s picture

@Capi, feel free to commit this if tested. Thanks.

SocialNicheGuru’s picture

Yes. this works.

  • arshadcn committed 07dc3ad on 7.x-3.x authored by barraponto
    Issue #2201773 by jason.fisher, barraponto: Cannot use string offset as...
shadcn’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cgove’s picture

Just want to thank you for this! I was pulling my hair out.