Hey everyone,
I am using .phtml files for templating, and I discovered that a php tag that is preceded with the combination of: any character, equals sign, either double or single quote, will result in odd error reporting behavior. Calling an incorrect function will terminating the script and will not display any error message in the browser. (Only for the condition described above. Otherwise it will report correctly.)
Try this code to duplicate the error: (Assuming error_reporting is set to E_ALL)
With href=" before <?php. The script terminates without displaying an error.
Now without the " before <?php. This script terminates and display the error.
I have this problem across my entire system, and I'm at least glad to know where the errors were mysteriously disappearing to. Does anyone know what the problem is? Thanks so much!
I am using .phtml files for templating, and I discovered that a php tag that is preceded with the combination of: any character, equals sign, either double or single quote, will result in odd error reporting behavior. Calling an incorrect function will terminating the script and will not display any error message in the browser. (Only for the condition described above. Otherwise it will report correctly.)
Try this code to duplicate the error: (Assuming error_reporting is set to E_ALL)
With href=" before <?php. The script terminates without displaying an error.
Code:
<p>one</p>
<p><a href="<?php notAFunc('two') ?>"></a></p>
<p>three</p>
Code:
<p>one</p>
<p><a href=<?php notAFunc('two') ?>"></a></p>
<p>three</p>
Comment