wp-cli / profile-command

Quickly identify what's slow with WordPress
MIT License
266 stars 29 forks source link

Unexpected End Of File #170

Closed DavidMillington-CD closed 2 years ago

DavidMillington-CD commented 3 years ago

Bug Report

I was trying to run the profiler on one of our older projects and it would exit saying "Error: unexpected end of file" along with the path to a file we include in the main template. Initially everything looked ok with that file and running it through the W3C Validator site did not produce any errors e.g. no broken tags. After a lot of trial and error I narrowed it down to a PHP short opening tag! I replaced <? with <?php and the profiler completed successfully.

I'm posting this in case anyone else has the same problem. Good luck.

danielbachhuber commented 2 years ago

Hey @DavidMillington-CD,

Glad you figured it out! Thanks for sharing your findings here 😄