You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHPC-804: Relax zpp types in Timestamp and UTCDateTime constructors
Changing "s" to "z" in zend_parse_parameters() allows integers to be accepted in strict types mode. If all necessary parameters are integers, we can also skip conversion to a string and back to a 64-bit integer.
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC, "Expected increment to be an unsigned 32-bit integer or string, %s given", zend_get_type_by_const(Z_TYPE_P(increment)));
172
+
return;
173
+
}
174
+
175
+
if (Z_TYPE_P(timestamp) ==IS_LONG) {
176
+
convert_to_string(timestamp);
177
+
}
178
+
179
+
if (Z_TYPE_P(timestamp) !=IS_STRING) {
180
+
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC, "Expected timestamp to be an unsigned 32-bit integer or string, %s given", zend_get_type_by_const(Z_TYPE_P(timestamp)));
0 commit comments