EasyCorp / EasyAdminBundle

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
MIT License
3.99k stars 1.01k forks source link

Warning: Trying to access array offset on value of type null #6243

Closed stealth-program closed 1 month ago

stealth-program commented 1 month ago

image

Steps to reproduce:

  1. make only integer fields available to search in crud.
  2. Enter letters in search field.
  3. Easyadmin expects only digits, so it makes broken queryBuilder(parts is empty), which results in error If I add some text field to ->setSearchFields(), error disappears.

The problem is in EasyCorp\Bundle\EasyAdminBundle\Orm\EntityRepository->addSearchClause() Easyadmin version 4.9.4

alshenetsky commented 1 month ago

Probably duplicate of https://github.com/EasyCorp/EasyAdminBundle/issues/6223 . I've already pushed a fix (https://github.com/EasyCorp/EasyAdminBundle/pull/6242), waiting to be merged

stealth-program commented 1 month ago

yes, duplicate