mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03:00
Fixup deprecations on PHP 8 (#2592)
* Fixup deprecations on PHP 8
Fix #2448
* Configure a default fallback for getInput function
* Appease phpcs
* Avoid changing getInput function
Revert "Configure a default fallback for getInput function"
This reverts commit 94004c5104
.
This commit is contained in:
parent
a5eb02d3c3
commit
d123e6007e
2 changed files with 9 additions and 7 deletions
|
@ -54,7 +54,7 @@ class FeedReducerBridge extends FeedExpander {
|
|||
}
|
||||
|
||||
public function getName(){
|
||||
$trimmedPercentage = preg_replace('/[^0-9]/', '', $this->getInput('percentage'));
|
||||
$trimmedPercentage = preg_replace('/[^0-9]/', '', $this->getInput('percentage') ?? '');
|
||||
return parent::getName() . ' [' . $trimmedPercentage . '%]';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ This bridge is not fetching its content through a secure connection</div>';
|
|||
$form .= '<label for="'
|
||||
. $idArg
|
||||
. '">'
|
||||
. filter_var($inputEntry['name'], FILTER_SANITIZE_STRING)
|
||||
. filter_var($inputEntry['name'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
. '</label>'
|
||||
. PHP_EOL;
|
||||
|
||||
|
@ -102,10 +102,12 @@ This bridge is not fetching its content through a secure connection</div>';
|
|||
$form .= self::getCheckboxInput($inputEntry, $idArg, $id);
|
||||
}
|
||||
|
||||
if(isset($inputEntry['title']))
|
||||
$form .= '<i class="info" title="' . filter_var($inputEntry['title'], FILTER_SANITIZE_STRING) . '">i</i>';
|
||||
else
|
||||
if(isset($inputEntry['title'])) {
|
||||
$title_filtered = filter_var($inputEntry['title'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$form .= '<i class="info" title="' . $title_filtered . '">i</i>';
|
||||
} else {
|
||||
$form .= '<i class="no-info"></i>';
|
||||
}
|
||||
}
|
||||
|
||||
$form .= '</div>';
|
||||
|
@ -153,9 +155,9 @@ This bridge is not fetching its content through a secure connection</div>';
|
|||
. ' id="'
|
||||
. $id
|
||||
. '" type="text" value="'
|
||||
. filter_var($entry['defaultValue'], FILTER_SANITIZE_STRING)
|
||||
. filter_var($entry['defaultValue'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
. '" placeholder="'
|
||||
. filter_var($entry['exampleValue'], FILTER_SANITIZE_STRING)
|
||||
. filter_var($entry['exampleValue'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
. '" name="'
|
||||
. $name
|
||||
. '" />'
|
||||
|
|
Loading…
Add table
Reference in a new issue