[wp-trac] [WordPress Trac] #41956: Errno in $wpdb
WordPress Trac
noreply at wordpress.org
Tue Oct 3 03:35:47 UTC 2017
#41956: Errno in $wpdb
-------------------------------------+------------------------------
Reporter: LeonN1960 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-refresh | Focuses:
-------------------------------------+------------------------------
Comment (by munyagu):
I changed how to hold the error info so that it should be, I think.
It was impossible to judge whether these change were all necessary or not.
{{{$wpdb}}} holds error information in {{{$last_error}}} field and
{{{$EZSQL_ERROR}}} global variable.
{{{$last_error}}} left as it was as legacy.
Newly added $last_err_no and {{{$last_err_msg}}}, and created a getter for
each.
({{{$last_err_msg}}} may have used {{{$last_error}}} as it is, but ...)
Also added a get_last_error function to retrieve only error info as an
array.
{{{$EZSQL_ERROR}}} also adds an error number at the end.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41956#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list