修正 WhereDidTheyGo plugin 在 WP 2.6 的錯誤訊息

更新到 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);

This entry was posted in wordpress and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
  • Google Friend Connect

  • Just for you

    Powered by MyBlogLog
  • Meta