allow empty metadata() - #18
Conversation
Fixed issue where function metadata threw and error because of it being empty if you wanted to read the root directory
jimdoescode
commented
Nov 4, 2015
Wouldn't you just pass a slash for the root directory? $lib->metadata('/'); |
jimdoescode
commented
Nov 4, 2015
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
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. |
Fixed issue where function metadata threw and error because of it being
empty if you wanted to read the root directory