Skip to content

actually catch wp_insert_attachment errors#159

Open
drzraf wants to merge 1 commit into
humanmade:masterfrom
drzraf:wp-insert-attachment-retval
Open

actually catch wp_insert_attachment errors#159
drzraf wants to merge 1 commit into
humanmade:masterfrom
drzraf:wp-insert-attachment-retval

Conversation

@drzraf

@drzraf drzraf commented Apr 26, 2018

Copy link
Copy Markdown

wp_insert_attachment() returns 0 unless the 4th parameter is set to TRUE in order to return a WP_Error (since 4.7.0)
https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/post.php#L4898

@rmccue

rmccue commented Jul 11, 2018

Copy link
Copy Markdown
Member

@drzraf Do not spam comment this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants