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
On articles pane the saving to DB should carefully validated, in case of an error. In other words safe_insert() should be checked and made sure it doesn't return FALSE.
If it does return FALSE, the article wasn't saved and mysql_insert_id() will give an incorrect ID.
When this happens, user's following saves will either commit saves to incorrect article, form goes to oblivion, or the form is ignored gracefully.
Attached a patch. The patch checks used safe_insert() and safe_update() instances' statuses, and returns human-friendly message, branded as E_ERROR, on error. Simple few line addition.
From jukka.svahn@rahinaa.biz on April 05, 2012 19:02:45
On articles pane the saving to DB should carefully validated, in case of an error. In other words safe_insert() should be checked and made sure it doesn't return FALSE.
If it does return FALSE, the article wasn't saved and mysql_insert_id() will give an incorrect ID.
When this happens, user's following saves will either commit saves to incorrect article, form goes to oblivion, or the form is ignored gracefully.
Original issue: http://code.google.com/p/textpattern/issues/detail?id=159
The text was updated successfully, but these errors were encountered: