Skip to content
Advertisement

Trying to access array offset on value of type null (Lumen QueueManager.php)

I have this code, but it throw an error when i try to use it even in simplest way.

<?php

namespace AppJobs;

use IlluminateSupportFacadesLog;

class RefreshUploadedFileId extends Job
{
    public function __construct()
    {
        //
    }

    public function handle()
    {
        Log::info('Hi, you reached here!');
    }
}

Usage:

use AppJobsRefreshUploadedFileId;

dispatch(new RefreshUploadedFileId);

Error message:

Trying to access array offset on value of type null at /home/***/public_html/vendor/illuminate/queue/QueueManager.php:156

PHP version: ^8.0

Lumen version: ^8.0

Advertisement

Answer

I solved this problem with changing QUEUE_CONNECTION from file to sync.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement