Skip to content

Commit a8a0ce3

Browse files
author
Francois Suter
committed
[BUGFIX] Fix error with null pid
In some contexts, like an eID call, the TSFE object exists but is not fully initialized and the pid may be null. Make sure it is 0 in such a case. Resolves #3
1 parent 920c5d1 commit a8a0ce3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
2016-11-16 Francois Suter <[email protected]>
22

33
* Added mapping for MarkJS, resolves #1
4+
* Fix error due to possibly null pid, resolves #3
45

56
2016-11-15 Francois Suter <[email protected]>
67

Classes/Utility/Logger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ public function log($logData)
143143
} elseif (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['debugData']['pid'])) {
144144
$pid = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['debugData']['pid'];
145145
}
146+
// Make sure that pid is not null
147+
if ($pid === null) {
148+
$pid = 0;
149+
}
146150
$entry->setPid($pid);
147151

148152
$entry->setCruserId(

0 commit comments

Comments
 (0)