mirror of
https://github.com/pelican-dev/panel.git
synced 2026-07-16 05:53:54 +03:00
Repair webhooks once again (#1815)
Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
This commit is contained in:
@@ -171,10 +171,14 @@ class WebhookConfiguration extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<mixed, mixed> $replacement
|
||||
* @param array<mixed, mixed>|object $replacement
|
||||
* */
|
||||
public function replaceVars(array $replacement, string $subject): string
|
||||
public function replaceVars(array|object $replacement, string $subject): string
|
||||
{
|
||||
if (is_object($replacement)) {
|
||||
$replacement = $replacement->toArray();
|
||||
}
|
||||
|
||||
return preg_replace_callback(
|
||||
'/{{(.*?)}}/',
|
||||
function ($matches) use ($replacement) {
|
||||
|
||||
Reference in New Issue
Block a user