Fix PHP7.1下更新缓存报错
This commit is contained in:
parent
482a6c8e0c
commit
8df41cb87f
|
@ -15,7 +15,7 @@ function build_cache_censor() {
|
||||||
|
|
||||||
$banned = $mod = array();
|
$banned = $mod = array();
|
||||||
$bannednum = $modnum = 0;
|
$bannednum = $modnum = 0;
|
||||||
$data = array('filter' => array(), 'banned' => '', 'mod' => '');
|
$data = array('filter' => array(), 'banned' => array(), 'mod' => array());
|
||||||
|
|
||||||
foreach(C::t('common_word')->fetch_all() as $censor) {
|
foreach(C::t('common_word')->fetch_all() as $censor) {
|
||||||
if(preg_match('/^\/(.+?)\/$/', $censor['find'], $a)) {
|
if(preg_match('/^\/(.+?)\/$/', $censor['find'], $a)) {
|
||||||
|
@ -77,4 +77,4 @@ function build_cache_censor() {
|
||||||
savecache('censor', $data);
|
savecache('censor', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue