Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/AphrontRedirectResponse.php
Context not available. | |||||
// If this is a remote resource it must have a domain set. This | // If this is a remote resource it must have a domain set. This | ||||
// would also be caught below, but testing for it explicitly first allows | // would also be caught below, but testing for it explicitly first allows | ||||
// us to raise a better error message. | // us to raise a better error message. | ||||
if (!strlen($uri_object->getDomain())) { | if (!@strlen($uri_object->getDomain())) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Refusing to redirect to external URI "%s". This URI '. | 'Refusing to redirect to external URI "%s". This URI '. | ||||
Context not available. | |||||
} else { | } else { | ||||
// If this is a local resource, it must not have a domain set. This allows | // If this is a local resource, it must not have a domain set. This allows | ||||
// us to raise a better error message than the check below can. | // us to raise a better error message than the check below can. | ||||
if (strlen($uri_object->getDomain())) { | if (@strlen($uri_object->getDomain())) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Refusing to redirect to local resource "%s". The URI has a '. | 'Refusing to redirect to local resource "%s". The URI has a '. | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0