Wednesday, January 19, 2022

[FIXED] Laravel dispatch with Closure suddenly returns an error

Issue

I keep getting this Opis\Closure\ClosureStream::stream_set_option is not implemented! when I'm running a closure using the dispatch helper.

        dispatch(function () use ($done) {
            foreach ($done as $order) {
              try{
                Log::info("Some code");
              }catch(\Exception $e){
                continue;
              }
            }
        });

It's been years since I've worked with PHP and I'm really stuck on this part.

I'm using vagrant with laravel 5.8 and my PHP 7.4.

Thanks in advance guys.


Solution

Also I encountered this error in botman laravel. This exception is due to PHP 7.4. I solved this error by downgrading my PHP version from 7.4 to 7.1



Answered By - Abdulhakim Zeinu

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.