1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-29 04:40:19 +02:00

Fixup deprecations on PHP 8

Fix #2448
This commit is contained in:
somini
2022-04-02 20:18:19 +01:00
parent 42788cd3ee
commit bedadbee38
2 changed files with 5 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ class FeedReducerBridge extends FeedExpander {
} }
public function getName(){ public function getName(){
$trimmedPercentage = preg_replace('/[^0-9]/', '', $this->getInput('percentage')); $trimmedPercentage = preg_replace('/[^0-9]/', '', $this->getInput('percentage') || '');
return parent::getName() . ' [' . $trimmedPercentage . '%]'; return parent::getName() . ' [' . $trimmedPercentage . '%]';
} }
} }

View File

@@ -88,7 +88,7 @@ This bridge is not fetching its content through a secure connection</div>';
$form .= '<label for="' $form .= '<label for="'
. $idArg . $idArg
. '">' . '">'
. filter_var($inputEntry['name'], FILTER_SANITIZE_STRING) . filter_var($inputEntry['name'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
. '</label>' . '</label>'
. PHP_EOL; . PHP_EOL;
@@ -103,7 +103,7 @@ This bridge is not fetching its content through a secure connection</div>';
} }
if(isset($inputEntry['title'])) if(isset($inputEntry['title']))
$form .= '<i class="info" title="' . filter_var($inputEntry['title'], FILTER_SANITIZE_STRING) . '">i</i>'; $form .= '<i class="info" title="' . filter_var($inputEntry['title'], FILTER_SANITIZE_FULL_SPECIAL_CHARS) . '">i</i>';
else else
$form .= '<i class="no-info"></i>'; $form .= '<i class="no-info"></i>';
} }
@@ -153,9 +153,9 @@ This bridge is not fetching its content through a secure connection</div>';
. ' id="' . ' id="'
. $id . $id
. '" type="text" value="' . '" type="text" value="'
. filter_var($entry['defaultValue'], FILTER_SANITIZE_STRING) . filter_var($entry['defaultValue'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
. '" placeholder="' . '" placeholder="'
. filter_var($entry['exampleValue'], FILTER_SANITIZE_STRING) . filter_var($entry['exampleValue'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
. '" name="' . '" name="'
. $name . $name
. '" />' . '" />'