[PHP-CVS] [php-src] PHP-8.4: sapi/lsapi: fix returns uninitialized value (#23281)

[email protected] (Go Kudo via GitHub)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: Go Kudo (zeriyoshi)
Committer: GitHub (web-flow)
Pusher: zeriyoshi
Date: 2026-08-15T01:02:07+09:00

Commit: https://github.com/php/php-src/commit/fa317bf0e963fae92d6b4fd9366bc4249920602f
Raw diff: https://github.com/php/php-src/commit/fa317bf0e963fae92d6b4fd9366bc4249920602f.diff

sapi/lsapi: fix returns uninitialized value (#23281)

Changed paths:
  M  NEWS
  M  sapi/litespeed/lsapi_main.c


Diff:

diff --git a/NEWS b/NEWS
index 1f1aab1cd076..ecb4d105e917 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@ PHP                                                                        NEWS
   . Fixed ZipArchive::extractTo() and ZipArchive::getFrom*() reporting success
     on corrupted entries. (David Carlier)
 
+- SAPI:
+  . Fixed returns uninitialized value on LiteSpeed lsapi SAPI (Go Kudo)
+
 27 Aug 2026, PHP 8.4.25
 
 - Core:
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index e6dc68954f4e..5d1e37a2b64e 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -1443,7 +1443,7 @@ void setArgv0( int argc, char * argv[] )
 #include <fcntl.h>
 int main( int argc, char * argv[] )
 {
-    int ret;
+    int ret = 0;
     int bindFd;
 
     char * php_ini_path = NULL;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.