dboehmer / coocook

👨‍🍳🦉 Web application for collecting recipes and making food plans
https://coocook.org/
Other
11 stars 2 forks source link

Updating a dish produces a server error #110

Closed MarkusLeupold closed 4 years ago

MarkusLeupold commented 4 years ago

Each time one triggers the "update dish" function from within a dishes view, the server responds with an error. This behaviour doesn't depend on which---if any---changes were made to the dish.

dboehmer commented 4 years ago

Thank you @MarkusLeupold for submitting an issue! Your description was precise and very helpful. Good luck getting your job done—I look forward to enjoy your food on Saturday. :smiley:

This should be fixed by 66af1c2. @moseschmiedel Have a look at what a dump mistake we made :man_facepalming:

The fix is already deployed on Coocook.org. Can you confirm the issue is resolved?

MarkusLeupold commented 4 years ago

Confirmed. The issue is resolved.

dboehmer commented 4 years ago

Issue is not yet fixed. Of course this fails if $item is not defined:

                     if ( not( $item and $item->ingredients->exists ) ) {
                         $item->delete();
                         next;
                     }