Closed jonmorten closed 9 years ago
I think the random poem method has flaw. If we remove poems from the DB, there will be missing indices in the table, and the Poem::find(ID) could attempt to get an index that does not exist.
Poem::find(ID)
https://github.com/jjmmkk/diktkassa/blob/782276590ae8f669a2d23729a3fcc0d5bd633196/app/controllers/PoemController.php#L59-L61
I think the random poem method has flaw. If we remove poems from the DB, there will be missing indices in the table, and the
Poem::find(ID)
could attempt to get an index that does not exist.https://github.com/jjmmkk/diktkassa/blob/782276590ae8f669a2d23729a3fcc0d5bd633196/app/controllers/PoemController.php#L59-L61