| 1 |
<?php |
| 2 |
|
| 3 |
namespace WP_DEFENDER_VENDOR\Safe; |
| 4 |
|
| 5 |
use WP_DEFENDER_VENDOR\Safe\Exceptions\FpmException; |
| 6 |
|
| 7 |
/** |
| 8 |
* This function flushes all response data to the client and finishes the |
| 9 |
* request. This allows for time consuming tasks to be performed without |
| 10 |
* leaving the connection to the client open. |
| 11 |
* |
| 12 |
* @throws FpmException |
| 13 |
* |
| 14 |
*/ |
| 15 |
function fastcgi_finish_request(): void |
| 16 |
{ |
| 17 |
error_clear_last(); |
| 18 |
$result = \fastcgi_finish_request(); |
| 19 |
if ($result === false) { |
| 20 |
throw FpmException::createFromPhpError(); |
| 21 |
} |
| 22 |
} |
| 23 |
|