Commit: fabbf81421b7fcc862c5ce2ccfa406fcfbf6c358
Author: David Persson | Date: 2010-01-22 02:16:11 +0100
diff --git a/extensions/phpca/Rule/EmptyLineBeforeCloseTagRule.php b/extensions/phpca/Rule/EmptyLineBeforeCloseTagRule.php
index 5363338..7ad13e7 100644
--- a/extensions/phpca/Rule/EmptyLineBeforeCloseTagRule.php
+++ b/extensions/phpca/Rule/EmptyLineBeforeCloseTagRule.php
@@ -25,6 +25,10 @@ class EmptyLineBeforeCloseTagRule extends Rule
$this->file->prev();
$a = $this->file->current();
+ if (!$a || !$b) {
+ return;
+ }
+
$string = $a->getText() . $b->getText();
$lineEndings = $this->configuration->getLineEndings();