X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiCSPReport.php;h=6271128171644bb9b3f161ede8502199539014fd;hb=2937c317a09a0399d667b614e5fcdc4c354e64ee;hp=82a7cce44bb5736b90c874715485712fd37bc94b;hpb=435e12e3eaea10e51854e6347d1bdc3f97a07c9f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiCSPReport.php b/includes/api/ApiCSPReport.php index 82a7cce44b..6271128171 100644 --- a/includes/api/ApiCSPReport.php +++ b/includes/api/ApiCSPReport.php @@ -176,8 +176,8 @@ class ApiCSPReport extends ApiBase { $flagText = '[' . implode( ', ', $flags ) . ']'; } - $blockedFile = isset( $report['blocked-uri'] ) ? $report['blocked-uri'] : 'n/a'; - $page = isset( $report['document-uri'] ) ? $report['document-uri'] : 'n/a'; + $blockedFile = $report['blocked-uri'] ?? 'n/a'; + $page = $report['document-uri'] ?? 'n/a'; $line = isset( $report['line-number'] ) ? ':' . $report['line-number'] : ''; $warningText = $flagText . ' Received CSP report: <' . $blockedFile .