Detecting syntax errors inside php function
Posted: Wed Feb 18, 2009 2:18 am
Hello,
I just spent at least half an hour debugging a simple syntax error:
if(isset($_POST['firstname'])) $mailbody = $mailbody . "First Name: " . $_POST['firstname'];
The yello marked dot was forgotten (it's almost invisible, i'm sorry).
The problem is that this code was part of a php function that is in a file that's part of Joomla component, so once it happened (syn error), all I got as a result was an empty page.
I know this might sound silly for people that know the solution, but I'm wondering hwo to track this kind of errors. Is there a solution?
Best,
Dan
I just spent at least half an hour debugging a simple syntax error:
if(isset($_POST['firstname'])) $mailbody = $mailbody . "First Name: " . $_POST['firstname'];
The yello marked dot was forgotten (it's almost invisible, i'm sorry).
The problem is that this code was part of a php function that is in a file that's part of Joomla component, so once it happened (syn error), all I got as a result was an empty page.
I know this might sound silly for people that know the solution, but I'm wondering hwo to track this kind of errors. Is there a solution?
Best,
Dan