branch: externals/phps-mode commit ec71e150c7a973510febe2794c93ecf430561025 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Fixed bug where token-numbers are not defined --- phps-functions.el | 4 +++- sample-php-files/class.php | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/phps-functions.el b/phps-functions.el index c792c0a..4020428 100644 --- a/phps-functions.el +++ b/phps-functions.el @@ -66,7 +66,9 @@ ;; When bracket count at start is larger than bracket count at end (when (and (boundp 'phps-mode/lexer-tokens) - (> indent-start indent-end)) + (> indent-start indent-end) + start-token-number + end-token-number) (let ((token-number start-token-number) (valid-tokens t) (last-token-is-open-brace nil) diff --git a/sample-php-files/class.php b/sample-php-files/class.php index 730480e..891b7e7 100644 --- a/sample-php-files/class.php +++ b/sample-php-files/class.php @@ -25,6 +25,18 @@ class MyClass if (!empty($this->var)) { $this->var = ''; } + if (empty( + $this->var + )) { + $this->var = 'abc'; + } + if (empty( + $this->var + ) && !empty($this->var) + ) { + $this->var = 'abc123'; + } + $this->var = 'abc'; $this->var = '\\'; }