[wp-trac] [WordPress Trac] #32352: Kill execution at unrecoverable database insert fails
WordPress Trac
noreply at wordpress.org
Mon Jul 20 06:08:22 UTC 2015
#32352: Kill execution at unrecoverable database insert fails
--------------------------------------------+------------------------------
Reporter: chriscct7 | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: Awaiting Review
Component: Database | Version:
Severity: major | Resolution:
Keywords: dev-feedback needs-patch early | Focuses:
--------------------------------------------+------------------------------
Comment (by chriscct7):
Replying to [comment:4 dd32]:
> I'm don't think the proposal here is something we want to / should do.
>
> In all cases where we insert data to the database, we should be looking
at the return value to determine if it succeeded, and if not, to take
appropriate action (ie. `return WP_Error()`, redirect, or `wp_die()`)
before continuing with any processing.
>
> In the case of #32308 it was exactly that, the failure to check the
return values which was ultimately causing a failure.
If a failure in table insertion occurs, on a core table, that could leave
sites completely unusable. Perhaps, the same way when an automatic core
update rolls back files on a failed upgrade, if the database upgrades fail
we could rollback the version as well. The proposal is basically any sort
of improvement that doesn't leave a site owner with a "bricked" website
following a database upgrade.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32352#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list