Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

allow empty metadata() #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

allow empty metadata() #18

wants to merge 1 commit into from

Conversation

byjpr
Copy link

@byjpr byjpr commented Nov 4, 2015

Fixed issue where function metadata threw and error because of it being
empty if you wanted to read the root directory

Fixed issue where function metadata threw and error because of it being
empty if you wanted to read the root directory
@jimdoescode
Copy link
Owner

Wouldn't you just pass a slash for the root directory?

$lib->metadata('/');

@jimdoescode
Copy link
Owner

I'm trying to figure out if there is a difference between passing a string with a slash vs not passing anything.

$lib->metadata('/');
$lib->metadata();

If these two calls are indeed functionally equivalent with your change then I'd argue that the first is more expressive than the second.

What are your thoughts @byjord? I don't have a CI env set up to test these anymore do you know if the call with the slash works? I remember it working when I tested this awhile back, but Dropbox could have changed the API since then.

@byjpr
Copy link
Author

byjpr commented Nov 14, 2015

To me, programming the Library to just assume null when empty instead of absolutely requiring a path be declaired seems like a nicer way to stay sain during a development. I will double check and get back to you about the slash.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants