If a song doesn't exist in the database, the application will throw a PHP error. To fix this, I check for rowCount() of the getSong method, and, if it's zero (i.e. that song_id doesn't exist in the database), I return false. I then check the status of that in the SongsController editSong method, and display either the edit page, or the error page depending.
This can be changed by the user in a variety of ways.
Understanding this page probably doesn't matter much to users of this framework, a bug is a bug.
@panique this is a rudimentary solution, and certainly not a hyper elegant one. If there's a better solution for it, please feel free to change it. This uses the error solution from PR #41, to display the error page in-place, instead of redirecting to the error page; this can be changed easily, however.
For #15:
If a song doesn't exist in the database, the application will throw a PHP error. To fix this, I check for rowCount() of the getSong method, and, if it's zero (i.e. that song_id doesn't exist in the database), I return false. I then check the status of that in the SongsController editSong method, and display either the edit page, or the error page depending.
This can be changed by the user in a variety of ways.
Understanding this page probably doesn't matter much to users of this framework, a bug is a bug.
@panique this is a rudimentary solution, and certainly not a hyper elegant one. If there's a better solution for it, please feel free to change it. This uses the error solution from PR #41, to display the error page in-place, instead of redirecting to the error page; this can be changed easily, however.