mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 10:04:54 +02:00
fix: various small notice fixes (#3474)
* fix(patreon): php notice * fix(pepperbridge): php notice * fix(ebay): php notice * fix(tiktok): php notice * fix(yandex): fix notice * fix(justwatch): notice * lint
This commit is contained in:
parent
372880b5ef
commit
748fc9fd65
9 changed files with 50 additions and 25 deletions
|
@ -316,7 +316,9 @@ abstract class BridgeAbstract implements BridgeInterface
|
|||
}
|
||||
$needle = $this->inputs[$this->queriedContext][$input]['value'];
|
||||
foreach (static::PARAMETERS[$context][$input]['values'] as $first_level_key => $first_level_value) {
|
||||
if ($needle === (string)$first_level_value) {
|
||||
// todo: this cast emits error if it's an array
|
||||
$valueString = (string) $first_level_value;
|
||||
if ($needle === $valueString) {
|
||||
return $first_level_key;
|
||||
} elseif (is_array($first_level_value)) {
|
||||
foreach ($first_level_value as $second_level_key => $second_level_value) {
|
||||
|
|
|
@ -43,6 +43,7 @@ final class Logger
|
|||
$context['url'] = get_current_url();
|
||||
$context['trace'] = trace_to_call_points(trace_from_exception($e));
|
||||
// Don't log these exceptions
|
||||
// todo: this logic belongs in log handler
|
||||
$ignoredExceptions = [
|
||||
'You must specify a format',
|
||||
'Format name invalid',
|
||||
|
|
|
@ -420,14 +420,11 @@ function getSimpleHTMLDOMCached(
|
|||
$defaultBRText = DEFAULT_BR_TEXT,
|
||||
$defaultSpanText = DEFAULT_SPAN_TEXT
|
||||
) {
|
||||
Logger::debug(sprintf('Caching url %s, duration %d', $url, $duration));
|
||||
|
||||
// Initialize cache
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope('pages');
|
||||
$cache->purgeCache(86400); // 24 hours (forced)
|
||||
$cache->purgeCache(86400);
|
||||
|
||||
$params = [$url];
|
||||
$cache->setKey($params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue