Add check on `self::$post`
This required validation filter is only useful when we have an uploaded file, hence a populated self::$post, but PHP will issue a warning when attempting to dereference self::$post->ID when there's no uploaded file (but the filter still runs) unless wrapped in isset() or empty().
I will be working on the plugin this week, so I will take a look at this and having any required updates added in the new version.
On Thu, Feb 18, 2016 at 8:22 PM TomAuger [email protected] wrote:
This required validation filter is only useful when we have an uploaded file, hence a populated self::$post, but PHP will issue a warning when attempting to dereference self::$post->ID when there's no uploaded file
(but the filter still runs) unless wrapped in isset() or empty().
You can view, comment on, or merge this pull request online at:
https://github.com/jupitercow/gravity-forms-post-updates/pull/6 Commit Summary
- Add check on
self::$postFile Changes
- M gravityforms-update-post.php https://github.com/jupitercow/gravity-forms-post-updates/pull/6/files#diff-0 (4)
Patch Links:
- https://github.com/jupitercow/gravity-forms-post-updates/pull/6.patch
- https://github.com/jupitercow/gravity-forms-post-updates/pull/6.diff
— Reply to this email directly or view it on GitHub https://github.com/jupitercow/gravity-forms-post-updates/pull/6.