Home » PHP » PHP_Beautifier » Bug #9078
php_beautifier script use addFilter defore addFilterDirectory
Details
| Submitted | 2006-10-18 08:09 UTC |
|---|---|
| From | maklaut at mail dot ru |
| Assigned | clbustos |
| Status | Closed |
| Package | PHP_Beautifier |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-10-18 08:09 UTC] maklaut at mail dot ru
Description:
------------
Use of my own filter from my home dir produce this error:
Oct 18 12:00:56 php_beautifier [error] Doesn't exists filter 'MyFilter'
that's happen because of wrong order in initializing
part of original code:
if ($aFilters) {
foreach($aFilters as $sName=>$aArgs) {
$oBeaut->addFilter($sName, $aArgs);
}
}
if ($aFiltersDirectory) {
foreach($aFiltersDirectory as $sDirectory) {
$oBeaut->addFilterDirectory($sDirectory);
}
}
addFilterDirectory must call before addFilter
Test script:
---------------
/usr/bin/php_beautifier \
--indent_tabs \
--recursive \
--directory_filters /home/my/
--filters "MyFilter()"
[2006-11-01 14:32 UTC] clbustos at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Fixed on SVN
http://beautifyphp.svn.sourceforge.net/viewvc/beautifyphp/trunk/