]> granicus.if.org Git - php/commitdiff
Remove MAY_BE_FALSE from range() type info
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 27 Apr 2020 13:32:29 +0000 (15:32 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 27 Apr 2020 13:36:32 +0000 (15:36 +0200)
ext/opcache/Optimizer/zend_func_info.c

index 81fd90cc2c65cc7dda4dff8f8e5a3720c45fd9ce..ad774facfe88f91c3f977077df74537a6822c3ac 100644 (file)
@@ -61,7 +61,7 @@ static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa
                uint32_t t2 = _ssa_op1_info(op_array, ssa, call_info->arg_info[1].opline,
                        &ssa->ops[call_info->arg_info[1].opline - op_array->opcodes]);
                uint32_t t3 = 0;
-               uint32_t tmp = MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG;
+               uint32_t tmp = MAY_BE_RC1 | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG;
 
                if (call_info->num_args == 3) {
                        t3 = _ssa_op1_info(op_array, ssa, call_info->arg_info[2].opline,
@@ -82,8 +82,8 @@ static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa
                }
                return tmp;
        } else {
-               /* may warning, and return FALSE */
-               return MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING;
+               /* May throw */
+               return MAY_BE_RC1 | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING;
        }
 }