@@ -307,7 +307,7 @@ static zend_never_inline zend_long ZEND_FASTCALL zendi_try_get_long(zval *op, bo
307
307
double dval = Z_DVAL_P (op );
308
308
zend_long lval = zend_dval_to_lval (dval );
309
309
if (!zend_is_long_compatible (dval , lval )) {
310
- zend_error ( E_DEPRECATED , "Implicit conversion to int from non-compatible float %f" , dval );
310
+ zend_incompatible_double_to_long_error ( dval );
311
311
if (UNEXPECTED (EG (exception ))) {
312
312
* failed = 1 ;
313
313
}
@@ -809,6 +809,11 @@ ZEND_API void ZEND_FASTCALL convert_to_object(zval *op) /* {{{ */
809
809
}
810
810
/* }}} */
811
811
812
+ void zend_incompatible_double_to_long_error (double d )
813
+ {
814
+ zend_error (E_DEPRECATED , "Implicit conversion to int from non-compatible float %f" , d );
815
+ }
816
+
812
817
ZEND_API zend_long ZEND_FASTCALL zval_get_long_func (zval * op , bool is_strict ) /* {{{ */
813
818
{
814
819
try_again :
@@ -828,7 +833,7 @@ ZEND_API zend_long ZEND_FASTCALL zval_get_long_func(zval *op, bool is_strict) /*
828
833
zend_long lval = zend_dval_to_lval (dval );
829
834
if (UNEXPECTED (is_strict )) {
830
835
if (!zend_is_long_compatible (dval , lval )) {
831
- zend_error ( E_DEPRECATED , "Implicit conversion to int from non-compatible float %f" , dval );
836
+ zend_incompatible_double_to_long_error ( dval );
832
837
// TODO Need to handle this here?
833
838
//if (UNEXPECTED(EG(exception))) {}
834
839
}
0 commit comments