prismicio-community / php-kit

Community maintained development kit for Prismic and the PHP language
https://prismic.io
Other
108 stars 82 forks source link

Return $defaultUrl in Api::previewSession() #115

Closed gsteel closed 8 years ago

gsteel commented 8 years ago

If the link resolver is unable to resolve the URL for the preview document and returns null, return the given default URL as opposed to the null received from the link resolver.

i.e - at the moment, I redirect to whatever URL Api::previewSession returns. If I get a null, my framework complains about a header with no value. I think this method should always return a string as the docs state, so whilst I could easily check the return value for this, I shouldn't have to…