Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of errata #4

Open
simonmackie opened this issue May 22, 2023 · 0 comments
Open

List of errata #4

simonmackie opened this issue May 22, 2023 · 0 comments

Comments

@simonmackie
Copy link

Page 54: Quotes missing around 3 in the second example
Page 339: editjoke.php says: $joke = find($pdo, 'joke', 'id', $_GET['id'])[0] ?? null; instead of: $joke = $jokesTable->find('id', $_GET['id'][0] ?? null;
Page 374: link 1 ==> 'This document has been superseded.'
Page 375: redundant $page = $jokeController->action();
Page 377 and further: the 'exit;' from page 373 disappears without explanation
Page 391: typo => $rotue
Page 419: mentions 'IjdbRoutes.php' --> not used anywhere before this point
Page 425: mentioning 'IjdbRoutes.php' again
Page 456: forgot FILTER_VALIDATE_EMAIL in filter_var function // $valid back without explanation
Page 506: getUser()-method in Authentication.php returns false instead of null => error
Page 507: mentions JokesController instead of Joke
Page 512: delete()-method instead of deleteSubmit()
Page 586: missing on GitHub ==> Relationships-ChangeCategories
Page 594: why these ";"?
Page 608: 'id' => $_POST['id'] - should be 'id' => $id
SQL error => 'permissions' doesn't have default value
Page 611: EDIT_JOKE and DELETE_JOKE were previously called EDIT_JOKES and DELETE_JOKES
Page 612: delete() i.p.v. deleteSubmit()
Page 650: where to put the $offset-calculation?
Page 654: inconsistency: isset($category) instead of is_numeric($categoryId) like on page 651
Page 654: changes getJokes() on this page and the page before are not included in final-website on GitHub
Page 564: inconsistency: change if-statement
Inconsistency in list-method Joke controller => user/author
After finishing the book, I still had a couple of issues:

  1. People still have access to Add Jokes - even when they're not logged in ==> gives error because $author->addJoke() cannot deal with null
  2. DeleteSubmit() method in Joke controller doesn't delete entries out of the joke_category table ==> while selecting category in Jokelist, $totalJokes will still include deleted jokes in the selected category.
    Thanks very much for publishing this boo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant