8000 File property: notice undefined property · Issue #217 · wp-papi/papi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

File property: notice undefined property #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nlemoine opened this issue Feb 10, 2017 · 3 comments
Closed

File property: notice undefined property #217

nlemoine opened this issue Feb 10, 2017 · 3 comments
Milestone

Comments

@nlemoine
Copy link
Contributor
nlemoine commented Feb 10, 2017

Description

Undefined property notice.

Steps to reproduce

  • Add a file property
  • Load and select a file (an mp4 video in my case, don't know if it matters)
  • Save

Page should now show a notice mentioning "undefined property on line 187" (in 3.1.18, line 185 on master) because, for a reason I didn't check, file isn't set.

What versions of softwares are you using?

  • Papi: 3.1.18
  • WordPress: 4.7.2
@frozzare frozzare added the bug label Feb 10, 2017
@frozzare frozzare added this to the v3.1.19 milestone Feb 10, 2017
@frozzare
Copy link
Member

Hm. Can't reproduce this with a image file or a excel file. But we can add a check that checks if file->file exists before it's used.

@nlemoine
Copy link
Contributor Author

I checked again, this issue happens with an mp4 file. You can download a sample one here.

frozzare added a commit that referenced this issue Feb 13, 2017
frozzare added a commit that referenced this issue Feb 13, 2017
frozzare added a commit that referenced this issue Feb 13, 2017
@frozzare
Copy link
Member

Looks like the file property value isn't set on some files, since basename works with urls we can just set file property value to url and get the same output.

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

No branches or pull requests

2 participants
0