Skip to content
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

Support better child path appending (handling of / is error-prone) #6

Closed
katowulf opened this issue Nov 7, 2014 · 1 comment
Closed

Comments

@katowulf
Copy link

katowulf commented Nov 7, 2014

When I append a child path, I have to remember to prefix it with /; could firebase-php check internally to make sure the / is present? This would also more closely match other Firebase APIs' handling of child paths.

Example:

$fb = new Firebase\Firebase(array(
  'base_url' => 'https://INSTANCE.firebaseio.com/phptest',
  'token' => SECRET,
),new GuzzleHttp\Client());

// this dumps the data for /phptestfoo instead of /phptest/foo :(
// there is no error or indication that the path is wrong
var_dump($fb->get('foo'));

Same is true for all get/set/push/delete et al methods.

@eelkevdbos
Copy link
Owner

Hi @katowulf, I've added automatic addition of a directory seperator in the case described above and added tests for it. Can you confirm the issue solved?

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