Skip to content

Commit

Permalink
Fixed session function name conflict with php native session function…
Browse files Browse the repository at this point in the history
… on some setups #3
  • Loading branch information
givanz committed May 3, 2024
1 parent e53819f commit 9e073c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions component/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace Vvveb\Plugins\ContactForm\Component;

use function Vvveb\__;
use function Vvveb\session;
use function Vvveb\session as sess;
use function Vvveb\email;
use function Vvveb\humanReadable;
use function Vvveb\siteSettings;
Expand Down Expand Up @@ -133,7 +133,7 @@ function request(&$results, $index = 0) {
list($html, $txt) = $this->arrayToText($meta, $html, $txt);

if ($this->options['email'] == true) {
$site = siteSettings(SITE_ID, session('language_id') ?? 1);
$site = siteSettings(SITE_ID, sess('language_id') ?? 1);
$subject = ($site['description']['title'] ?? '') . ' - ' . $formName . (isset($post['subject']) ? ' - ' . $post['subject'] : '');
$to = $this->options['sendto'] ?? $site['contact-email'] ?? false;

Expand Down Expand Up @@ -162,4 +162,4 @@ function results() {

return $results;
}
}
}

0 comments on commit 9e073c5

Please sign in to comment.