mirror of
https://github.com/boostorg/website.git
synced 2026-01-22 17:52:30 +00:00
- Use `http_response_code` as it's a bit more robust than using `header`. - Check errors against `error_reporting()`, so that error checks can be ignored when appropriate.
17 lines
350 B
PHP
17 lines
350 B
PHP
<?php
|
|
|
|
/* Test suppressing errors by using '@', or by setting 'error_reporting'. */
|
|
|
|
require_once(__DIR__.'/../../../bootstrap.php');
|
|
|
|
$path = __DIR__."/does-not-exist.txt";
|
|
|
|
error_reporting(-1);
|
|
assert(!@file_get_contents($path));
|
|
|
|
error_reporting(0);
|
|
assert(!file_get_contents($path));
|
|
|
|
error_reporting(E_ERROR);
|
|
assert(!file_get_contents($path));
|