更新到 WordPress 2.6 之後, Where did they go from here 這個 plugin 就會跳 warning 出來.

warning: unserialize() expects parameter 1 to be string, array given in /home/xxxxxxxx/public_html/wp-content/plugins/wheredidtheygov1.php on line 97

參考其他 plugin 的解法是先用 is_serialized() 判斷, 如下修改即可

64,66c64
< if (is_serialized($linkpostids)) {
< $linkpostids = unserialize($linkpostids);
< }
---
> $linkpostids = unserialize($linkpostids);
99,101c97
< if (is_serialized($lpids)) {
< $lpids = unserialize($lpids);
< }
---
> $lpids = unserialize($lpids);

Tags: ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>