Avoid PHP Warnings that breaks the javascript code.