Skip to content

Commit e6e5c1e

Browse files
safety checks for session_start
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent c388363 commit e6e5c1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prestashop8.x/tawkto.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ private function installTab()
101101
*/
102102
public function hookDisplayFooter()
103103
{
104-
session_start();
104+
if (session_status() === PHP_SESSION_NONE && !headers_sent()) {
105+
session_start();
106+
}
105107

106108
$current_widget = self::getPropertyAndWidget();
107109
if (empty($current_widget)) {

0 commit comments

Comments
 (0)