From 9980972b85ac3785ac7fbc4578b02ea9f3f90a7e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Oct 2025 13:24:50 +0200 Subject: [PATCH] phar: Remove duplicated error-handling code This is already handled by the switch below. --- ext/phar/phar_object.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index c30145d9fb940..ca19a38b2cfef 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -703,11 +703,6 @@ PHP_METHOD(Phar, webPhar) goto cleanup_fail; } - if (Z_TYPE_P(rewrite_fci.retval) == IS_UNDEF || Z_TYPE(retval) == IS_UNDEF) { - zend_throw_exception_ex(phar_ce_PharException, 0, "phar error: rewrite callback must return a string or false"); - goto cleanup_fail; - } - switch (Z_TYPE(retval)) { case IS_STRING: efree(entry);