myFMbutler/myFMApiLibrary-for-PHP

Overeager usage of curl_escape preventing connection

Closed this issue · 2 comments

When I try to connect to a server, curl_escape is cleaning up the whole URI, not just the path.

$completeUrl = curl_escape($ch, $this->baseUrl.$url);

To fix, you should change
$completeUrl = curl_escape($ch, $this->baseUrl.$url);
to something like
$completeUrl = $this->baseUrl . curl_escape($ch, $url);

Otherwise people will get exceptions like
Lesterius/FileMakerApi/Exception/Exception with message 'Could not resolve host: http%3A%2F%2Ftestserver.int%2Ffmi%2Fdata%2Fv1%2Fdatabases%2FDEV_TEST%2Fsessions'

Fix will be in V1.0.1.
Thanks

Hi! The fix is not in the current version. Can this be revisited?

Clarification: The "fixed" code in this closed bug also fails, for the same reason. The problem was not fixed.