[aru_2]因为要用一个插件切换为php7.2 结果突然主题有个地方报错[aru_15]
[alert class="danger"]Warning:
count():Parameter
must
be
an
array
or
anobject
that
implements
Countable
count[/alert]
结果搜了一下 emmmm 很多遇到的
错误原因:[alert class="warning"]php7.2下,count限制了count()函数的参数类型[/alert]
解决办法:/wp-includes/post-template.php
第310行,修改为[alert class="success"]if ( is_array( $pages ) ) {
if ( $page > count( $pages ) ) // if the requested page doesn’t exist
$page = count( $pages ); // give them the highest numbered page that DOES exist
} else {
$page = 0;
}[/alert]