昨天有朋友在MSN上告诉我,我的Erss不能访问了,我看了一下果然是出了问题,错误提示是:
Fatal error: Only variables can be passed by reference
in .../inc/magpie/rss_parse.inc on line 352
我的RSS订阅用的是DCBA增强过的Lilina,而Lilina的后台用的是Magpie,这个问题显然出在Magpie上。
Google一下,赫然发现居然遭遇了几年前Magpie的一个Bug,解决方案早已给出,extlib/rss_parse.inc需要修正,diff文件在以下地址可以找到:
http://svn.gregarius.net/trac/attachment/ticket/175/namespace.diff
主要的变更为:
extlib/rss_parse.inc
| old | new | |
|---|---|---|
| 350 | 350 | if ( $this->current_namespace ) |
| 351 | 351 | { |
| 352 | 352 | if ( $this->initem ) { |
| 353 | $real_element = ""; | |
| 354 | ||
| 355 | $element_tree = explode("_", $el); | |
| 356 | $real_element =& $this->current_item[ $this->current_namespace ]; | |
| 357 | ||
| 358 | foreach ($element_tree as $tree_element) { | |
| 359 | if (!is_array($real_element)) { | |
| 360 | $real_element = array(); | |
| 361 | } | |
| 362 | ||
| 363 | $real_element =& $real_element[$tree_element]; | |
| 364 | } | |
| 365 | ||
| 353 | 366 | $this->concat( |
| 354 | $ | |
| 367 | $real_element, $text); | |
| 355 | 368 | } |
| 356 | 369 | elseif ($this->inchannel) { |
| 357 | 370 | $this->concat( |
| ... | ... | |
| 367 | 380 | } |
| 368 | 381 | } |
| 369 | 382 | else { |
| 370 | if ( $this->initem | |
| 383 | if ( $this->initem && !is_array($this->current_item[ $el ])) { | |
| 371 | 384 | $this->concat( |
| 372 | 385 | $this->current_item[ $el ], $text); |
| 373 | 386 | } |
不过有一点不解的是,这个Bug是怎么触发的?为什么今天被我遇到了?
记录一下,也许还有别人会遇到的。
-The End-
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




