Skip to content
Advertisement

Laravel 8 job Cannot pass parameter 1 by reference error

I’m working with a Laravel 8 project and have created a Job that gets processed. I’ve got several functions to extract functionality but am getting the following error:

Cannot pass parameter 1 by reference

The trace is initially saying on line 65, which would be 'title' => $page->header ?? "Page $key" but I’m not sure what I’m missing here?

My attached job is:

JavaScript

Advertisement

Answer

Not sure about the error but you didn’t provide your array to array_push method

it should be

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