required fileter congig patch
- You cannot open a new topic into this forum
- Guests cannot post into this forum
msg# 1
Hi,GIJOE!
Whwn required filters config item in admin menu is not specified by user, I have a php warning message
"empty heystack" in file transact_function.php.
This is a patch for suppless the warning.
// forced filters
$filters_forced = array_map( 'trim' , explode( ',' , $mod_config['filters_forced'] ) ) ;
foreach( $filters_forced as $filter_forced ) {
$regs = explode( ':' , $filter_forced ) ;
if( strlen( $filter_forced ) > 0 ) { // hoshiyan(hoshiba-farm.com) 2007/03/23
if( stristr( $filter_forced , ':LAST' ) ) {
$filters[ $regs[0] ] = 0 ;
} else {
$filters = array( $regs[0] => 0 ) + $filters ;
}
}
}
In your pico code, usege of array_map php function is useful for reference. Its excellent!
PHP/5.2.0-8, Apache2
Hoshiyan
Votes:5
Average:8.00
msg# 1.1
hi hoshiyan.
This is not a bug of pico but a bug of PHP 5.2.0
In PHP 5.2.1, this bug is fixed.
http://bugs.php.net/bug.php?id=39364
Votes:1
Average:10.00
msg# 1.1.1
Hi, GIJOE!
Oh, I see! I'll update my php to the latest version, soon. Thank you for your info.
Hoshiyan
Votes:3
Average:10.00