Skip to content

Commit c7fc682

Browse files
committed
Not compatible with PHP 7 due to changes to substr
PHP 7 substr changes: "If string is equal to start characters long, an empty string will be returned. Prior to this version, FALSE was returned in this case."
1 parent 30c2233 commit c7fc682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CoffeeScript/Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ function token($tag, $value = NULL)
12841284

12851285
function tokenize()
12861286
{
1287-
while ( ($this->chunk = substr($this->code, $this->index)) !== FALSE )
1287+
while ( ($this->chunk = substr($this->code, $this->index)) != FALSE )
12881288
{
12891289
$types = array('identifier', 'comment', 'whitespace', 'line', 'heredoc',
12901290
'string', 'number', 'regex', 'js', 'literal');

0 commit comments

Comments
 (0)