From: Zeev Suraski Date: Thu, 10 Feb 2000 19:28:05 +0000 (+0000) Subject: More protection... X-Git-Tag: BEFORE_SAPIFICATION_FEB_10_2000~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25b5cb95990210000600db050db819446ac47cdb;p=php More protection... --- diff --git a/main/SAPI.c b/main/SAPI.c index 006789a474..11e92e8e01 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -378,13 +378,15 @@ SAPI_API int sapi_flush() if (sapi_module.flush) { SLS_FETCH(); - sapi_module.flush(SG(server_context)); - return SUCCESS; - } else { - return FAILURE; + if (SG(server_context)) { + sapi_module.flush(SG(server_context)); + return SUCCESS; + } } + return FAILURE; } + SAPI_API struct stat *sapi_get_stat() { SLS_FETCH();