Skip to content

File property: notice undefined property #217

Closed

Description

@nlemoine

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

Activity

  1. added this to the v3.1.19 milestone on Feb 10, 2017
  2. frozzare commented on Feb 13, 2017

    @frozzare
    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.

  3. nlemoine commented on Feb 13, 2017

    @nlemoine
    ContributorAuthor

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

  4. frozzare commented on Feb 13, 2017

    @frozzare
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions