Skip to content

Commit 077f403

Browse files
committed
Fix: read: Turning data into custom types
1 parent b1f3804 commit 077f403

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/read.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ void data_to_custom_type(const char *string_value, zend_ulong type, zval *zv_res
162162

163163
{
164164
zend_long _long = 0; double _double = 0;
165-
is_numeric_string(string_value, strlen(string_value), &_long, &_double, 0);
165+
166+
if (!(type & READ_TYPE_STRING)) {
167+
is_numeric_string(string_value, strlen(string_value), &_long, &_double, 0);
168+
}
166169

167170
if (Z_TYPE_P(zv_result_t) == IS_ARRAY) {
168171
if (_double > 0) {

0 commit comments

Comments
 (0)