[php-src] PR #19056: Fix unreachable code in URL output handler

From: Date: Sun, 06 Jul 2025 19:44:18 +0000
Subject: [php-src] PR #19056: Fix unreachable code in URL output handler
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-32352@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/19056 Author: cla7aye15I4nd ## Description This PR fixes a logical issue in the URL output handler where the final else branch was unreachable due to redundant conditionals. ## Problem The existing code had the following structure: ```c if (ZSTR_LEN(url_state->url_app.s) != 0) { // handle non-empty case } else if (ZSTR_LEN(url_state->url_app.s) == 0) { // handle empty case } else { // unreachable branch *handled_output = NULL; } ``` Since ZSTR_LEN() returns a size_t (unsigned integer), the value can only be either "not equal to 0" or "equal to 0". The third else branch was unreachable, making the *handled_output = NULL; assignment dead code.

« previous php.git-pulls (#32352) next »