diff --git a/src/decimal.c b/src/decimal.c index a5bab69..a4ba9d0 100644 --- a/src/decimal.c +++ b/src/decimal.c @@ -397,6 +397,7 @@ static php_decimal_success_t php_decimal_do_operation_handler(zend_uchar opcode, /* Unsupported op type - return success to avoid casting. */ if (UNEXPECTED(op == NULL)) { php_decimal_operator_not_supported(); + ZVAL_UNDEF(result); return SUCCESS; } diff --git a/src/number.c b/src/number.c index 2970b93..1f9a72c 100644 --- a/src/number.c +++ b/src/number.c @@ -105,6 +105,7 @@ static php_decimal_success_t php_decimal_number_do_operation(zend_uchar opcode, /* Unsupported operator - return success to avoid casting. */ if (UNEXPECTED(func == NULL)) { php_decimal_operator_not_supported(); + ZVAL_UNDEF(result); return SUCCESS; } diff --git a/src/rational.c b/src/rational.c index 1038135..e4d6686 100644 --- a/src/rational.c +++ b/src/rational.c @@ -316,6 +316,7 @@ static php_decimal_success_t php_decimal_rational_do_operation(zend_uchar opcode /* Unsupported operator - return success to avoid casting. */ if (UNEXPECTED(op == NULL)) { php_decimal_operator_not_supported(); + ZVAL_UNDEF(result); return SUCCESS; }