forked from wallabag/wallabag
Modernize to PHP 8.1
This commit is contained in:
@ -95,11 +95,11 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
|
||||
|
||||
$extraFields = [];
|
||||
foreach ($extraFieldsStrings as $extraField) {
|
||||
if (!str_contains($extraField, '=')) {
|
||||
if (!str_contains((string) $extraField, '=')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
[$fieldName, $fieldValue] = explode('=', $extraField, 2);
|
||||
[$fieldName, $fieldValue] = explode('=', (string) $extraField, 2);
|
||||
$extraFields[$fieldName] = $fieldValue;
|
||||
}
|
||||
|
||||
|
||||
@ -98,9 +98,9 @@ class LoginFormAuthenticator
|
||||
$extraFields = [];
|
||||
|
||||
foreach ($siteConfig->getExtraFields() as $fieldName => $fieldValue) {
|
||||
if (str_starts_with($fieldValue, '@=')) {
|
||||
if (str_starts_with((string) $fieldValue, '@=')) {
|
||||
$fieldValue = $this->expressionLanguage->evaluate(
|
||||
substr($fieldValue, 2),
|
||||
substr((string) $fieldValue, 2),
|
||||
[
|
||||
'config' => $siteConfig,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user