[wp-trac] [WordPress Trac] #4737: Attempting to edit post/page that doesn't exist doesn't generate an error message

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 13 07:44:18 GMT 2007


#4737: Attempting to edit post/page that doesn't exist doesn't generate an error
message
----------------------------+-----------------------------------------------
 Reporter:  Viper007Bond    |       Owner:  anonymous  
     Type:  defect          |      Status:  new        
 Priority:  lowest          |   Milestone:  2.3 (trunk)
Component:  Administration  |     Version:  2.3        
 Severity:  minor           |    Keywords:  has-patch  
----------------------------+-----------------------------------------------
 `post.php?action=edit&post=X` (and it's page counterpart) doesn't check
 the entered ID to see if it exists. If a user edits the URL (or more
 likely bookmarks the URL for later editing) but the post ID doesn't exist
 (say it's deleted after bookmark), no pretty error message is displayed.

 Instead, a blank edit form is displayed (such as the Write post screen)
 and on the edit post page, following error is displayed:

 {{{
 Warning: Attempt to assign property of non-object in [...]/wp-admin/edit-
 form-advanced.php on line 49
 }}}

 (for obvious reasons)

 A simple fix is attached that should do the job.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4737>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list