__FILE__ magic constant containing wrong values #2
		Referencia en una nueva incidencia
	
	Block a user
	
	No se ha proporcionado una descripción.
		
		Eliminar rama "%!s() "
	 
	Eliminar una rama es permanente. Aunque la rama eliminada puede continuar existiendo durante un corto tiempo antes de que sea eliminada, en la mayoría de los casos NO PUEDE deshacerse. ¿Continuar?
Aer Information
e53cfb8ba0Your problem description
When several source files are included/required, the magic constant contains wrong data. Code snippet contains 3 files:
test.php:
<?php echo __FILE__ . ' - ' . __LINE__ . "\n"; require_once('test2.php'); echo __FILE__ . ' - ' . __LINE__ . "\n"; ?>
test2.php:
<?php echo __FILE__ . ' - ' . __LINE__ . "\n"; require_once('test3.php'); echo __FILE__ . ' - ' . __LINE__ . "\n"; ?>
test3.php:
<?php echo __FILE__ . ' - ' . __LINE__ . "\n"; ?>
Expected result differs from the actual result. This bug makes debugging more difficult.
Expected results
test.php - 2
test2.php - 2
test3.php - 2
test2.php - 4
test.php - 4
Current results
test.php - 2
test2.php - 2
test3.php - 2
./test3.php - 4
test2.php - 4
Additional information
debug_backtrace() function is also affected by this bug, but there line number is also not working correctly, returning always 1:
The above code results in:
TEST:
array(2) {
[line] =>
int(1)
[file] =>
string(8 'test.php')
}
This can be related with https://github.com/symisc/PH7/issues/20
This is the one bug i ran into thats when i decided to give up on my project
Unfortunately this is a bug in basic functionality and we have to fix it. This will make any kind of debugging harder.
Im looking into this
i have completed one part but for the life of me i cant think how todo replace ../ etc with the actual dir i will commit changes into file_magic branch shortly i hope the unix eqiv works too but the win32 version does
This is connected with #3, I think. This is connected with #2, I think. There is a general problem with information about file & line position in PH7. FILE shows some trash, while debug_backtrace() simply gets currently processed file and returns only last callback instead of whole backtrace.
How is it now with the current code ?
I'll do my best to close this today.