Skip to content

Commit f5f147d

Browse files
committed
Added undefined var for internal messages
1 parent ed7a4bf commit f5f147d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CodeSniffer/File.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,8 @@ public function addError($error, $stackPtr, $code='', $data=array(), $severity=0
742742
// Work out which sniff generated the error.
743743
if (substr($code, 0, 9) === 'Internal.') {
744744
// Any internal message.
745-
$sniff = $code;
745+
$sniff = $code;
746+
$sniffCode = $code;
746747
} else {
747748
$parts = explode('_', str_replace('\\', '_', $this->_activeListener));
748749
if (isset($parts[3]) === true) {
@@ -873,7 +874,8 @@ public function addWarning($warning, $stackPtr, $code='', $data=array(), $severi
873874
// Work out which sniff generated the warning.
874875
if (substr($code, 0, 9) === 'Internal.') {
875876
// Any internal message.
876-
$sniff = $code;
877+
$sniff = $code;
878+
$sniffCode = $code;
877879
} else {
878880
$parts = explode('_', str_replace('\\', '_', $this->_activeListener));
879881
if (isset($parts[3]) === true) {

0 commit comments

Comments
 (0)