Skip to content

error when adding a wellplate after upgrading to PHP8 and Laravel 10

On dev6 machine running version 982c302, when adding a wellplate (from the backend), if we select "yeast" in the multiple checkbox of the 'contenttype' field, we then obtain the following error:

count(): Argument #1 (closed) ($value) must be of type Countable|array, stdClass given

which is indicated to correspond to line 159 of resources / views / vendor / voyager / bread / browse.blade.php

  @if (@count(json_decode($data->{$row->field})) > 0)

Tests:

  • Bug does not occur on dev3 running version v2.1.1-beta & PHP7
  • On dev6: I can visit again the browse view of wellplates after I delete the problematic entry.
  • On dev6: Bug does not occur if I do not check anything in the multiple checkbox of the 'type' field.
Edited by Gael Yvert