Skip to content

Commit 1327829

Browse files
committed
Fix ref assignable with strict types
Made a mistake here when refactoring the code, causing a failure in serialization test.
1 parent a427595 commit 1327829

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Zend/zend_execute.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,10 @@ static zend_always_inline int i_zend_verify_type_assignable_zval(
28682868

28692869
/* SSTH Exception: IS_LONG may be accepted as IS_DOUBLE (converted) */
28702870
if (strict) {
2871-
return type_code == IS_DOUBLE && zv_type == IS_LONG;
2871+
if (type_code == IS_DOUBLE && zv_type == IS_LONG) {
2872+
return -1;
2873+
}
2874+
return 0;
28722875
}
28732876

28742877
/* No weak conversions for arrays and objects */

0 commit comments

Comments
 (0)