required fileter congig patch
List posts in the topic
required fileter congig patch
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
Posts tree