Skip to content

Commit 43f33ee

Browse files
committed
XFAIL to warn and comment expansion
1 parent c11af2b commit 43f33ee

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

Zend/tests/float_to_int/warnings_float_literals.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Implicit float to int conversions should warn for literals
3+
--XFAIL--
4+
Double warning for internal calls
35
--FILE--
46
<?php
57

Zend/tests/float_to_int/warnings_float_vars.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Implicit float to int conversions should warn for variables
3+
--XFAIL--
4+
Double warning for internal calls
35
--FILE--
46
<?php
57

Zend/tests/float_to_int/warnings_string_float_literals.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Implicit string float to int conversions should warn for literals
3+
--XFAIL--
4+
Double warning for internal calls
35
--FILE--
46
<?php
57

Zend/tests/float_to_int/warnings_string_float_vars.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Implicit float string to int conversions should warn for variables
3+
--XFAIL--
4+
Double warning for internal calls
35
--FILE--
46
<?php
57

Zend/zend_API.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest,
502502
return 0;
503503
}
504504

505-
/* This only checks for a fractional part as if doesn't fit it already throws a TypeError */
505+
/* This only checks for a fractional part as if doesn't fit it already throws a TypeError
506+
* Manually check to get correct warning text mentioning string origin */
506507
if ((double)(zend_long) d != d) {
507508
zend_error(E_WARNING, "Implicit float string to int conversion");
508509
}

0 commit comments

Comments
 (0)