0

I am using pbmedia/laravel-ffmpeg as soon as I installed and added the providers and alias, it shows me the following error. This code was simply working on another machine

array_merge(): Argument #2 is not an array

I have tried the following things

  1. Composer update/ and Fresh install
  2. Cleaning the bootstrap/cache/
  3. Checked the config file for laravel-ffmpeg it's there and fine
  4. Publish the config file using the artisan CLI tool: php artisan vendor:publish --provider="Pbmedia\LaravelFFMpeg\FFMpegServiceProvider"

Here is the portion from laravel.log when I tried to run.

[2019-06-19 00:34:40] local.ERROR: ErrorException: array_merge(): Argument #2 is not an array in /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:59
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'array_merge(): ...', '/Users/damanmok...', 59, Array)
#1 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(59): array_merge(Array, 1)
#2 /Users/damanmokha/edetyv2/vendor/pbmedia/laravel-ffmpeg/src/FFMpegServiceProvider.php(25): Illuminate\Support\ServiceProvider->mergeConfigFrom('/Users/damanmok...', 'laravel-ffmpeg')
#3 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(565): Pbmedia\LaravelFFMpeg\FFMpegServiceProvider->register()
#4 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(74): Illuminate\Foundation\Application->register(Object(Pbmedia\LaravelFFMpeg\FFMpegServiceProvider))
#5 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(540): Illuminate\Foundation\ProviderRepository->load(Array)
#6 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders()
#7 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap(Object(Illuminate\Foundation\Application))
#8 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(267): Illuminate\Foundation\Application->bootstrapWith(Array)
#9 /Users/damanmokha/edetyv2/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(113): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 /Users/damanmokha/edetyv2/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 {main} 

if I don't add these providers it works fine, but then I am not able to use ffmpeg without that.

  • Laravel Version 5.3
  • pbmedia/laravel-ffmpeg 1.3
  • php version: 7.1
5
  • check your configration file one the file return single value not array (must be send as array not single value) Commented Jun 19, 2019 at 5:54
  • Did you Publish the config file using the artisan CLI tool? Commented Jun 19, 2019 at 5:55
  • @HirenGohel yes it responds with Nothing to publish for tag []. Commented Jun 19, 2019 at 6:02
  • Possible duplicate of Laravel: array_merge(): Argument #2 is not an array error Commented Jun 19, 2019 at 6:02
  • @JigneshJoisar please check the steps, also I have tried the same answer from this question, already mentioned. but it's not helping. Commented Jun 19, 2019 at 6:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.