Seldaek / php-console

PHP Debug Console
Other
529 stars 93 forks source link

line numbers are in-accurate #25

Closed staabm closed 11 years ago

staabm commented 11 years ago

some parts of the posted code are processed and therefore line-numbers from the error on client side do not match with the origin input.

example input:

<?php
throw new Exception('lala');

outputs

Uncaught exception 'Exception' with message 'lala' in /home/COMPLEX/mstaab/htdocs/tools/php-console/index.php(64) : eval()'d code:1

but in fact the error is on line 2 in the origin code. The issue in this example is, that on server side <?php is stripped from the source.

I will provide a PR which leaves a empty line for the origin <?php tag (and remove the trim() to get this aligned again.