forked from wallabag/wallabag
Modernize to PHP 8.0
This commit is contained in:
@ -21,7 +21,7 @@ class ArraySiteConfigBuilder implements SiteConfigBuilder
|
||||
{
|
||||
$host = strtolower($host);
|
||||
|
||||
if ('www.' === substr($host, 0, 4)) {
|
||||
if (str_starts_with($host, 'www.')) {
|
||||
$host = substr($host, 4);
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
|
||||
|
||||
// required by credentials below
|
||||
$host = strtolower($host);
|
||||
if ('www.' === substr($host, 0, 4)) {
|
||||
if (str_starts_with($host, 'www.')) {
|
||||
$host = substr($host, 4);
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ class LoginFormAuthenticator
|
||||
$crawler = new Crawler((string) $html);
|
||||
|
||||
$loggedIn = $crawler->evaluate((string) $siteConfig->getNotLoggedInXpath());
|
||||
} catch (\Throwable $e) {
|
||||
} catch (\Throwable) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ class LoginFormAuthenticator
|
||||
$extraFields = [];
|
||||
|
||||
foreach ($siteConfig->getExtraFields() as $fieldName => $fieldValue) {
|
||||
if ('@=' === substr($fieldValue, 0, 2)) {
|
||||
if (str_starts_with($fieldValue, '@=')) {
|
||||
$fieldValue = $this->expressionLanguage->evaluate(
|
||||
substr($fieldValue, 2),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user