diff options
| author | 2025-02-23 17:08:17 +0100 | |
|---|---|---|
| committer | 2025-02-23 17:08:17 +0100 | |
| commit | f7b4a1e74220af1d0db310f17ba1294862a32393 (patch) | |
| tree | 349527d1e8538233d1ed337c5888973b6a0a1ccf /app/views/helpers/feed/update.phtml | |
| parent | b0b75dd635831e23a4241e52a9ecd5fce0fb26b9 (diff) | |
PHPStan more checkImplicitMixed (#7339)
* PHPStan more checkImplicitMixed
* Draft Entry.php
* Finish Entry.php
* Finish FeedDAO.php and Themes.php
Diffstat (limited to 'app/views/helpers/feed/update.phtml')
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 92fedd992..54d3e77a0 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -781,8 +781,14 @@ ?> </select> <div class="stick"> + <?php + $postFields = $this->feed->attributeArray('curl_params')[CURLOPT_POSTFIELDS] ?? ''; + if (!is_string($postFields)) { + $postFields = ''; + } + ?> <input type="text" name="curl_fields" id="curl_fields" value="<?= - htmlspecialchars($this->feed->attributeArray('curl_params')[CURLOPT_POSTFIELDS] ?? '', ENT_COMPAT, 'UTF-8') + htmlspecialchars($postFields, ENT_COMPAT, 'UTF-8') ?>" placeholder="<?= _t('sub.feed.method_postparams') ?>" /> </div> <p class="help"><?= _i('help') ?> <?= _t('sub.feed.method_help') ?></p> @@ -810,8 +816,15 @@ <div class="form-group"> <label class="group-name" for="http_headers"><?= _t('sub.feed.http_headers') ?></label> <div class="group-controls"> + <?php + $httpHeaders = $this->feed->attributeArray('curl_params')[CURLOPT_HTTPHEADER] ?? []; + if (!is_array($httpHeaders)) { + $httpHeaders = []; + } + $httpHeaders = array_filter($httpHeaders, 'is_string'); + ?> <textarea class="valid-json" id="http_headers" name="http_headers" rows="3" cols="64" spellcheck="false"><?php - foreach ($this->feed->attributeArray('curl_params')[CURLOPT_HTTPHEADER] ?? [] as $header) { + foreach ($httpHeaders as $header) { echo htmlspecialchars($header, ENT_NOQUOTES, 'UTF-8'), PHP_EOL; } ?></textarea> |
