テストしたのは、index.php でerror_reporting(E_ALL) としていて、物理的にネットワークと接続していない時だけですが、
W3C_XHTML_DTD_LOCATION で設定したサイトに、アクセスできないことがエラーの原因なので、
ネットワーク障害などの理由でもWarning が出そうです。
cvs:plugin/update_entities.inc.php (v 1.15)
function plugin_update_entities_create($do = FALSE) { $files = array('xhtml-lat1.ent', 'xhtml-special.ent', 'xhtml-symbol.ent'); $entities = array_map('plugin_update_entities_strtr', array_values(get_html_translation_table(HTML_ENTITIES))); $items = array('php:html_translation_table'); $matches = array(); foreach ($files as $file) { // FIXME: 'allow_url_fopen = Off' will stop this - $source = file(W3C_XHTML_DTD_LOCATION . $file); + $source = @file(W3C_XHTML_DTD_LOCATION . $file); // or die_message('cannot receive ' . W3C_XHTML_DTD_LOCATION . $file . '.'); if (! is_array($source)) { $items[] = 'w3c:' . $file . ' COLOR(red):not found.'; continue; }
file() で収得に失敗した時は、直後のif (! is_array($source)) のところでフォローしているので、
この修正で十分だと思うのですがどうでしょうか。
http://xoops.hypweb.net/modules/forum/index.php?topic_id=2754 での指摘ですが、"(?=[a-zA-Z0-9]\{$min,$max})" によって作られる文字列が'(?=[a-zA-Z0-9]\{2,8})' のようになってしまい、繰り返し指定が無効化され正しくマッチしなくなるそうです。
cvs:plugin/update_entities.inc.php (r1.15) 110行目
- $pattern = "(?=[a-zA-Z0-9]\{$min,$max})" . generate_trie_regex($entities); + $pattern = '(?=[a-zA-Z0-9]{' . $min . ',' . $max . '})' . generate_trie_regex($entities);