Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix HEREDOC bug

Summary:
Heredocs weren't scanning properly in XHP 1.2.1. This fixes that

Test Plan:
$foo = <<<HERE
HERE;

Reviewed By: epriestley

Revert: OK
  • Loading branch information...
commit 8e7221668a5d36e4b9bb5af13ce569f19fb572ff 1 parent c577a2d
@laverdet laverdet authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  ext.hpp
  2. +1 −0  xhp/scanner.l
View
2  ext.hpp
@@ -4,7 +4,7 @@
#endif
#include "php.h"
-#define PHP_XHP_VERSION "1.2.1"
+#define PHP_XHP_VERSION "1.2.2"
#define PHP_XHP_EXTNAME "xhp"
extern zend_module_entry xhp_module_entry;
View
1  xhp/scanner.l
@@ -444,6 +444,7 @@ NEWLINE ("\r\n"|"\n"|"\r")
}
++yyextra->lineno;
yyextra->heredoc_yyleng = yyleng;
+ yymore();
}
[^\r\n]+ {
set_state(PHP_HEREDOC_DATA);
Please sign in to comment.
Something went wrong with that request. Please try again.