We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1facc93 commit b877c2eCopy full SHA for b877c2e
1 file changed
src/GitAttributes/Writer.php
@@ -116,10 +116,14 @@ private function format(string $content): string
116
];
117
}
118
119
- if ([] !== $rows && 'raw' === $rows[array_key_last($rows)]['type'] && '' === $rows[array_key_last(
120
- $rows
121
- )]['line']) {
122
- array_pop($rows);
+ $lastRowKey = array_key_last($rows);
+
+ if (null !== $lastRowKey) {
+ $lastRow = $rows[$lastRowKey];
123
124
+ if ('raw' === $lastRow['type'] && '' === $lastRow['line']) {
125
+ array_pop($rows);
126
+ }
127
128
129
$formattedLines = [];
0 commit comments