PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_Beautifier » Bug #5389

Opening tag gets damaged in first line of code beautified

Details

Submitted2005-09-13 21:57 UTC
Fromjuancarlos182 at hotmail dot com
StatusNo Feedback
PackagePHP_Beautifier
PHP Version5.0.4
OSWindows
Roadmaps(Not assigned)

Comments

[2005-09-13 21:57 UTC] juancarlos182 at hotmail dot com

Description:
------------
it's a weird problem, I don't get it all the time, and it doesn't matter if I just beautify one file of code, but for batch it's really tedious to just go and make changes in every single file

when it happens, it always happens in the first line

Test script:
---------------
code to beautify:

<?php
include_once ("turnos.conf.php");
?>

this code I beautify with:

try {
$oBeaut = new PHP_Beautifier();
$oBeaut->addFilter('ArrayNested');
$oBeaut->addFilter('IndentStyles',array('style'=>'allman'));
$oBeaut->setInputString($allSourceCode);
$oBeaut->process();
$allSourceCode = $oBeaut->get();
}
catch(Exception $oExp) {
echo ($oExp);
}

i don't think filters I use got anything to do with it

Expected result:
----------------
<?php include_once ("turnos.conf.php");
?>

Actual result:
--------------
< ? phpinclude_once ("turnos.conf.php");
?>

[2005-09-14 23:56 UTC] clbustos at php dot net

Hola Carlos:
Como supongo que hablas castellano, te responde en español :P
Mira, envíame el archivo con el cual haces la conversión y un par de archivos que generen el error.
No he podido reproducir el bug acá; prueba, también, a bajar la última versión del paquete. Gracias!