[wp-trac] [WordPress Trac] #39732: Allowing wp_update_comment() to return WP_Error
WordPress Trac
noreply at wordpress.org
Sun Jan 29 16:32:00 UTC 2017
#39732: Allowing wp_update_comment() to return WP_Error
--------------------------------------+--------------------
Reporter: enrico.sorcinelli | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Comments | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------
Comment (by enrico.sorcinelli):
Replying to [comment:2 swissspidy]:
> Two notes on the patch after a quick glance:
>
> * Coding standards need to be adhered to (e.g. curly braces)
> * The `// Check for WP_Error` comments are redundant. It's clear what
`if ( is_wp_error( $updated ) )` does.
My fault :-)
I added curly braces where missing (FYI, `wp-admin/includes/comment.php`
contains a lot of braceless statements) and removed redundant comments
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39732#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list