Skip to content

Commit 6544d73

Browse files
committed
1.0.2 - Check if $ _SESSION is set, to avoid "Undefined variable: _SESSION in.."
1 parent f1bc9b8 commit 6544d73

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.2 - 2018-09-06
4+
### Fixed
5+
- Check if $ _SESSION is set, to avoid "Undefined variable: _SESSION in.."
6+
37
## 1.0.1 - 2018-09-04
48
### Fixed
59
- Array to string conversion in mail template

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "bitboxde/error-notifier",
33
"description": "Sending an email if an error occurred.",
44
"type": "craft-plugin",
5-
"version": "1.0.1",
5+
"version": "1.0.2",
66
"keywords": [
77
"craft",
88
"cms",

src/services/HandleException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ protected function getUserVars()
106106

107107
protected function getSessionVars()
108108
{
109+
if (session_status() === PHP_SESSION_NONE) {
110+
session_start();
111+
}
112+
109113
return print_r($_SESSION, true);
110114
}
111115

0 commit comments

Comments
 (0)