Browse Source

Fix: read: Turning data into custom types

viest 5 năm trước cách đây
mục cha
commit
077f40371e
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      kernel/read.c

+ 4 - 1
kernel/read.c

@@ -162,7 +162,10 @@ void data_to_custom_type(const char *string_value, zend_ulong type, zval *zv_res
 
     {
         zend_long _long = 0; double _double = 0;
-        is_numeric_string(string_value, strlen(string_value), &_long, &_double, 0);
+
+        if (!(type & READ_TYPE_STRING)) {
+            is_numeric_string(string_value, strlen(string_value), &_long, &_double, 0);
+        }
 
         if (Z_TYPE_P(zv_result_t) == IS_ARRAY) {
             if (_double > 0) {