1

While validating my new module on Prestashop Validator, I am getting the following error in my main controller file (php file).

End of line character is invalid; expected "\n" but found "\r\n"

I am getting the error on the first line that only has the starting <?php tag.

I have researched so much about it on the Internet but unable to find a solution for it. I am struck.

What should I do?

Wolfack
  • 2,667
  • 1
  • 26
  • 50

1 Answers1

2

In Notepad++, first go to View --> Show Symbol --> Show All Characters

All characters including spaces, tabs, and new lines (CR LF).

Hit Ctrl + H for "Find and Replace."

In "Find What," look for "\r\n"

Replace with "\n".

Click "Replace All"

All CR's should now be removed and should fix the error.

Gaurav Pal
  • 36
  • 3