Simplify InternalUrlValidator::isValid()

refs #11920
This commit is contained in:
Eric Lippmann 2016-09-09 15:22:24 +02:00
parent 1f980f92f2
commit ef7be98e0c
1 changed files with 5 additions and 3 deletions

View File

@ -16,11 +16,13 @@ class InternalUrlValidator extends Zend_Validate_Abstract
*/
public function isValid($value)
{
$isExternal = Url::fromPath($value)->isExternal();
if ($isExternal) {
if (Url::fromPath($value)->isExternal()) {
$this->_error('IS_EXTERNAL');
return false;
}
return ! $isExternal;
return true;
}
/**