mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-04 04:19:29 +00:00
Avoid a PHP Error when attempting to embed the parent post of an attachment, when the parent post ID is invalid. Instead check if the parent post object exists before checking the read permission for the parent post. Props GhostToast. Fixes #39881. Merges [40306] to the 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@40337 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40244 1a063a9b-81f0-0310-95a4-ce76da25c4cd