From 5a61ceb666ea3b11aa11870a05e03536c8d6665b Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@afi-sa.fr> Date: Thu, 4 Dec 2014 11:21:15 +0100 Subject: [PATCH] dev #17990 fix url validator --- library/ZendAfi/Validate/Url.php | 2 +- tests/library/ZendAfi/Validate/UrlTest.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/ZendAfi/Validate/Url.php b/library/ZendAfi/Validate/Url.php index 6f9b8e951c7..abf30630193 100644 --- a/library/ZendAfi/Validate/Url.php +++ b/library/ZendAfi/Validate/Url.php @@ -28,7 +28,7 @@ class ZendAfi_Validate_Url extends Zend_Validate_Abstract { return true; if (false == strpos($valueString,'://')) $valueString='http:/'.$valueString; - $this->_setValue($valueString); + $this->_setValue($value); if (!Zend_Uri::check($valueString)) { $this->_error(self::INVALID_URL); diff --git a/tests/library/ZendAfi/Validate/UrlTest.php b/tests/library/ZendAfi/Validate/UrlTest.php index 5abc70810f6..351bdcba81d 100644 --- a/tests/library/ZendAfi/Validate/UrlTest.php +++ b/tests/library/ZendAfi/Validate/UrlTest.php @@ -36,7 +36,9 @@ class UrlTest extends PHPUnit_Framework_TestCase { public function invalidUrls() { return [ ['images/manchots.png'], - ['1234'] ]; + ['1234'], + ['blob'] + ]; } -- GitLab