I have a block field with a foo
field. It exists, has content but $field->exists()
returns false. This is a bug, right? $field->isNotEmpty()
has the expected behavior though.
get_class($block->foo()); // Kirby\Cms\Field
$block->foo()->value(); // 'bar'
$block->content()->toArray(); // [ 'foo' => 'bar' ]
array_key_exists('foo', $block->content()->toArray()); // true
$block->foo()->exists(); // false
$block->foo()->isNotEmpty(); // true
Kirby 3.7.3
PHP 8.0.19