This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ branches:
9
9
10
10
cache :
11
11
directories :
12
- - $HOME/.composer/cache
12
+ - $HOME/.composer/
13
13
14
14
env :
15
15
global :
@@ -50,17 +50,17 @@ matrix:
50
50
- php : 7.1
51
51
env :
52
52
- DEPS=latest
53
- - php : hhvm
53
+ - php : nightly
54
54
env :
55
55
- DEPS=lowest
56
- - php : hhvm
56
+ - php : nightly
57
57
env :
58
58
- DEPS=locked
59
- - php : hhvm
59
+ - php : nightly
60
60
env :
61
61
- DEPS=latest
62
62
allow_failures :
63
- - php : hhvm
63
+ - php : nightly
64
64
65
65
before_install :
66
66
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
@@ -81,7 +81,7 @@ script:
81
81
- if [[ $EXECUTE_HOSTNAME_CHECK == "true" && $TRAVIS_PULL_REQUEST == "false" ]]; then php bin/update_hostname_validator.php --check-only; fi
82
82
83
83
after_script :
84
- - if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
84
+ - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer upload-coverage ; fi
85
85
86
86
notifications :
87
87
email : false
Original file line number Diff line number Diff line change @@ -177,7 +177,9 @@ function getNewValidTlds($string)
177
177
function getPunycodeDecoder ()
178
178
{
179
179
if (function_exists ('idn_to_utf8 ' )) {
180
- return 'idn_to_utf8 ' ;
180
+ return function ($ domain ) {
181
+ return idn_to_utf8 ($ domain , 0 , INTL_IDNA_VARIANT_UTS46 );
182
+ };
181
183
}
182
184
183
185
$ hostnameValidator = new Hostname ();
Original file line number Diff line number Diff line change @@ -530,7 +530,7 @@ public function isValid($value)
530
530
protected function idnToAscii ($ email )
531
531
{
532
532
if (extension_loaded ('intl ' )) {
533
- return (idn_to_ascii ($ email ) ?: $ email );
533
+ return (idn_to_ascii ($ email, 0 , INTL_IDNA_VARIANT_UTS46 ) ?: $ email );
534
534
}
535
535
return $ email ;
536
536
}
@@ -553,7 +553,7 @@ protected function idnToUtf8($email)
553
553
// the source string in those cases.
554
554
// But not when the source string is long enough.
555
555
// Thus we default to source string ourselves.
556
- return idn_to_utf8 ($ email ) ?: $ email ;
556
+ return idn_to_utf8 ($ email, 0 , INTL_IDNA_VARIANT_UTS46 ) ?: $ email ;
557
557
}
558
558
return $ email ;
559
559
}
Original file line number Diff line number Diff line change 9
9
10
10
namespace Zend \Validator \File ;
11
11
12
+ use Countable ;
12
13
use Zend \Validator \AbstractValidator ;
13
14
use Zend \Validator \Exception ;
14
15
@@ -109,7 +110,7 @@ public function getFiles($file = null)
109
110
*/
110
111
public function setFiles ($ files = [])
111
112
{
112
- if (count ($ files ) === 0 ) {
113
+ if (null === $ files || (( is_array ( $ files ) || $ files instanceof Countable) && count ($ files ) === 0 ) ) {
113
114
$ this ->options ['files ' ] = $ _FILES ;
114
115
} else {
115
116
$ this ->options ['files ' ] = $ files ;
You can’t perform that action at this time.
0 commit comments