Skip to content
Advertisement

I’m working at laravel project but there is always that error : ErrorException Creating default object from empty value

this is my candidatController.php the error is in the line before the last line($prev_canditure->etat="archifé";)

JavaScript

Advertisement

Answer

From your code you can use a defensive code approach by checking if the query will return null

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