PEAK XOOPS - required fileter congig patch in englishin japanese

required fileter congig patch

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2007/3/23 7:18
hoshiyan  企霹始   Posts: 8
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
Previous post - Next post | Parent - Children.1 | Posted on 2007/3/24 3:46
GIJOE  黎扦烦菱   Posts: 4110
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
Previous post - Next post | Parent - No child | Posted on 2007/3/24 5:56
hoshiyan  企霹始   Posts: 8
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

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!