php版本升级引发的问题

今天把服务器上的php从5.3.9升级到5.4.8.

代码中有一句:

is_private_weibo($_weibo[‘qid’]);

而is_private_weibo的期望的参数为一个数组…

return isset($weibo[‘src’]) ? $weibo[‘src’] : 1;

新版本的php会报warning…..嗯..很好..

php >= 5.4.5 时连接sphinx会出问题

Warning: mysql_connect(): Server sent charset (0) unknown to the client. Please, report to the developers in /data/t/dev/include/weibo/Search.php on line 296

Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to the developers in /data/t/dev/include/weibo/Search.php on line 296

http://sphinxsearch.com/bugs/view.php?id=1249

升级到2.0.6即可解决.