Reputation: 1242
We are working in a team with a cakephp project where bitbucket is using as version control system. During code deployment once I got an unexpected behavior without any error. After invested long time to investigate the issue, the culprit find out. In the file starting code, there is strange notation included like following:
What is the solution to avoid this issue? Help is very much needed because in very large project it is difficult to track in which file this problem exist. Thanks in advance.
Upvotes: 1
Views: 70
Reputation: 5041
This is a Byte Order Mark, shown above as CP1252 characters! 
I don't believe that phpstorm would've put that there, but it definitely preserves it if it's already present.
You should install PHP Code Sniffer and run phpcs /path/to/project/dir --sniffs=Generic.Files.ByteOrderMark
to find if there are any other BOMs in your files and remove as needed. Then ask your team whose IDE may be adding them.
Upvotes: 2