]> granicus.if.org Git - php/commitdiff
More protection...
authorZeev Suraski <zeev@php.net>
Thu, 10 Feb 2000 19:28:05 +0000 (19:28 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 10 Feb 2000 19:28:05 +0000 (19:28 +0000)
main/SAPI.c

index 006789a474445364d71a2228c759d6957bcc3fd5..11e92e8e01f5a9e149632e89afb2fea5afdbe755 100644 (file)
@@ -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();