More PHP8.4 updates

This commit is contained in:
James Cole
2025-05-04 13:47:00 +02:00
parent e42107c03c
commit 51e86448c7
195 changed files with 524 additions and 715 deletions

View File

@@ -142,8 +142,8 @@ class RuleRepository implements RuleRepositoryInterface, UserGroupInterface
continue;
}
$triggerType = $trigger->trigger_type;
if (str_starts_with($trigger->trigger_type, '-')) {
$triggerType = substr($trigger->trigger_type, 1);
if (str_starts_with((string) $trigger->trigger_type, '-')) {
$triggerType = substr((string) $trigger->trigger_type, 1);
}
$needsContext = config(sprintf('search.operators.%s.needs_context', $triggerType)) ?? true;
if (false === $needsContext) {
@@ -359,7 +359,7 @@ class RuleRepository implements RuleRepositoryInterface, UserGroupInterface
$stopProcessing = $trigger['stop_processing'] ?? false;
$active = $trigger['active'] ?? true;
$type = $trigger['type'];
if (true === ($trigger['prohibited'] ?? false) && !str_starts_with($type, '-')) {
if (true === ($trigger['prohibited'] ?? false) && !str_starts_with((string) $type, '-')) {
$type = sprintf('-%s', $type);
}