gravity-forms-post-updates icon indicating copy to clipboard operation
gravity-forms-post-updates copied to clipboard

Add check on `self::$post`

Open TomAuger opened this issue 9 years ago • 1 comments

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().

TomAuger avatar Feb 19 '16 02:02 TomAuger

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::$post

File 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.

jupitercow avatar Mar 08 '16 16:03 jupitercow