mailerlite / laravel-elasticsearch

An easy way to use the official Elastic Search client in your Laravel applications.
MIT License
909 stars 187 forks source link

Cannot access offset of type string on string #145

Closed ghost closed 1 year ago

ghost commented 1 year ago

After installing the latest version I get this error back using PHP 8.2.3 and both tagged version 10.0 and using dev-master.

Generating autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   TypeError

  Cannot access offset of type string on string

  at vendor/cviebrock/laravel-elasticsearch/src/Factory.php:184
    180▕             }
    181▕         }
    182▕
    183▕         // Build and return the client
  ➜ 184▕         if ($host['api_id'] !== null && $host['api_key'] !== null) {
    185▕             $clientBuilder->setApiKey($host['api_id'], $host['api_key']);
    186▕         }
    187▕
    188▕         return $clientBuilder->build();

      +23 vendor frames

  24  artisan:33
      Illuminate\Foundation\Console\Kernel::handle()
ghost commented 1 year ago

I am an idiot and had an outdated config file :-)