Error Message for l::get($page->field())


I’m getting this error message

Warning: Illegal offset type in isset or empty in [...]/kirby/toolkit/lib/silo.php on line 30

when echoing something like

echo l::get( $page->status() )

status is a select field

label: Status
type:  select
  sale: Zu Verkaufen
  preparing: In Vorbereitung
  notforsale: Unverkäuflich
  sold: Verkauft

and the language file looks like this

'sale' => 'for sale',
'preparing' => 'is being prepared',
'notforsale' => 'unverkäuflich',
'sold' => 'sold',


It works when I hardcode

echo l::get( 'sale' )

I’m thankful for any suggestions

Just a guess, but maybe this works …

$status = $page->status()->value();
echo l::get($status);

As far as I know $page->status() isn’t a string.

1 Like

thanks a lot flo, this works

1 Like