Skip to content
Permalink
Browse files

[core:func] fix Warning error

  • Loading branch information
nao-pon committed Feb 12, 2014
1 parent f67dd4b commit 0a9125556b53ec9a9b18a7d04bb887d72aeb8185
Showing with 10 additions and 4 deletions.
  1. +10 −4 xoops_trust_path/modules/xpwiki/class/func/pukiwiki_func.php
@@ -748,15 +748,21 @@ function autolink_pattern_write($filename, $autolink_pattern)
{
list($pattern, $pattern_a, $forceignorelist) = $autolink_pattern;

$forceignorelist_ci = array_map('strtolower', $forceignorelist);
$forceignorelist_ci = array_unique($forceignorelist_ci);
if (is_array($forceignorelist) && ($fi_count = count($forceignorelist))) {
$forceignorelist_ci = array_map('strtolower', $forceignorelist);
$forceignorelist_ci = array_unique($forceignorelist_ci);
$forceignorelist_ci = array_combine($forceignorelist_ci, array_fill(0, count($forceignorelist_ci) ,true));
$forceignorelist = array_combine($forceignorelist, array_fill(0, $fi_count ,true));
} else {
$forceignorelist = $forceignorelist_ci = array();
}

if (! HypCommonFunc::flock_put_contents($filename,
$pattern . "\n"
. $pattern_a . "\n"
. join("\t", $forceignorelist) . "\n"
. serialize(array_combine($forceignorelist, array_fill(0, count($forceignorelist) ,true))) . "\n"
. serialize(array_combine($forceignorelist_ci, array_fill(0, count($forceignorelist_ci) ,true))) . "\n"
. serialize($forceignorelist) . "\n"
. serialize($forceignorelist_ci) . "\n"
)) {
$this->die_message('Cannot write ' . $filename);
}

0 comments on commit 0a91255

Please sign in to comment.
You can’t perform that action at this time.