hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

\nFatal error: syntax error, unexpected T_ELSE, expecting $end in<Redacted>/blog/wp-content/themes/lustrous/functions/theme-functions.php on line 1

Open r3wt opened this issue 11 years ago • 10 comments

but line 1 of the file is

<?php

:confused:

r3wt avatar Apr 02 '15 19:04 r3wt

can you replicate when using php? If you can, then it's a bug in your code, if you can't, then you're going to have to link to the code otherwise this issue cannot be reproduced.

ghost avatar Apr 02 '15 20:04 ghost

its a bug in hhvm. obviously. i need to delete the jit cache

r3wt avatar Apr 02 '15 21:04 r3wt

rolled back to HHVM-3.5.0 issue dissapears.

r3wt avatar Apr 02 '15 22:04 r3wt

Can you paste a contained example showing the error? Hard to tell exactly what's going on here from from what you've said.

paulbiss avatar Apr 02 '15 22:04 paulbiss

MVC SLIM APP contains '/blog' route. this route includes the wp index.php file there is no contained example and its not shareable code

r3wt avatar Apr 02 '15 23:04 r3wt

If you can come up with an isolated example that has the same problem it would be really helpful. Without more to go on, unfortunately, I'm not sure how much we're going to be able to do.

paulbiss avatar Apr 03 '15 00:04 paulbiss

it works on 3.5.0 and doesn't in 3.6.1 what did you change?

r3wt avatar Apr 03 '15 00:04 r3wt

There were 580 commits spanning 3,612 files. You're welcome to bisect, but as I've said, with such little information there's not really anything I can do to narrow it down for you.

https://github.com/facebook/hhvm/compare/HHVM-3.5...HHVM-3.6

paulbiss avatar Apr 03 '15 00:04 paulbiss

I can repro by running hhvm functions/theme-functions.php, a file found in https://downloads.wordpress.org/theme/lustrous.1.3.1.zip. Repro'd in hhvm 3.6.2. FYI, the file has Mac-style line endings (carriage return, no newline). I'm guessing that's the trigger of the problem, and it's probably why the error is reported on "line 1."

aingram avatar May 26 '15 06:05 aingram

@aingram you can use mac2unix to convert the line endings for now until its fixed.

r3wt avatar May 26 '15 06:05 r3wt