summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/filter/logical_filters.c2
-rw-r--r--ext/filter/tests/bug46973.phpt4
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c
index 40011a9e21..a26bdaf5db 100644
--- a/ext/filter/logical_filters.c
+++ b/ext/filter/logical_filters.c
@@ -570,7 +570,7 @@ static int _php_filter_validate_ipv6(char *str, int str_len TSRMLS_DC) /* {{{ */
}
if (*str == ':') {
if (compressed || --blocks == 0) {
- return ipv4 != NULL;
+ return 0;
}
if (++str == end || (ipv4 && ipv4 == str)) {
return 1;
diff --git a/ext/filter/tests/bug46973.phpt b/ext/filter/tests/bug46973.phpt
index c9c5ba4301..01a5118cfc 100644
--- a/ext/filter/tests/bug46973.phpt
+++ b/ext/filter/tests/bug46973.phpt
@@ -9,6 +9,6 @@ var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FL
?>
--EXPECTF--
-string(28) "1fff::a88:85a3::172.31.128.1"
+bool(false)
string(39) "3ffe:6a88:85a3:08d3:1319:8a2e:0370:7344"
-string(28) "1fff::a88:85a3::172.31.128.1"
+bool(false)