Jump to content

Issue while validating with PSR-2 on Prestashop Validator


Raghubendra

Recommended Posts

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 have researched so much about it on the Internet but unable to find a solution for it. I am struck.

 

What should I do?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

If you're using Notepad++ then it would easier to right-click on the "DOS/Windows" setting in the information area at the bottom (to the left of the current character set which should be UTF-8) and selecting "Unix/OSX Format" - then save.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...