You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's much better if you also mention the place(in the code) you have spotted this.
IMHO, many of such issues are left wrong deliberately as the authors have only been "explaining" an approach(and not choosing it) and then on some next pages, they have introduced a new(and better) option. To make sure this part of the program has continued to exist until the final version, you can check the final-website branch and see whether it's still there.
(I'm not saying this issue is wrong at all, I've just said what I've experienced).
The error occurs because $author and $joke are no longer arrays. This is a
simple fix: change the syntax that reads from an array to use the object syntax:
Plus, as I said, it is correct in the sample code, which the bottom of the page says. It's just missing that one item in the $jokes array.
I know because I've read through the section 3x because I don't understand it.
This;
` $author = $this->authorsTable->findById($joke->authorId);
`
Should be:
` $author = $this->authorsTable->findById($joke->authorId);
Otherwise, you get error messages where Edit & Delete should be. (It's correct in the sample code.)
The text was updated successfully, but these errors were encountered: