Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #22884, comment 5


Ignore:
Timestamp:
12/13/2012 11:51:20 AM (12 years ago)
Author:
mukkundthanki
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22884, comment 5

    v1 v2  
    1 yes mark. I think it should. I have found that when I hit save it checks if this post exists or not with "get_post" and "get_instance" and at last "get_row" method of WPDB class. so "get_instance" returns false to "get_post" and it returns null and finally die with capability check with user. well I think it should be died earlier while checking with db. can we alter only db methods with this type of checks like table exists or what actually returns and then taking further actions with specific results.
     1yes mark. I think it should. I have found that when I hit save it checks if this post exists or not with "get_post" and "get_instance" and at last "get_row" method of WPDB class. so "get_instance" returns false to "get_post" and it returns null and finally die with capability check with user and thats why we get "You are not allowed to edit this post." error. well I think it should be died earlier while checking with db. can we alter only db methods with this type of checks like table exists or what actually returns and then taking further actions with specific results.
    22
    33Thanks nacin. I have seen what you have stated and its really useful. well My thought is about making WordPress realize what actually happened out there, may be it gives more load to admin and affect performance.