Web
2007-07-28
遭遇Magpie多年前的一个Bug
昨天有朋友在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-
历史上的今天
- 2020-07-28 2020 :国产数据库名录和产品信息一览-墨天轮
- 2011-07-28 Oracle数据封锁机制及Exadata技术交流 - ACOUG七月交流活动
- 2010-07-28 Oracle数据库恢复:解决ORA-600 2831错误
- 2010-07-28 Linux下硬盘格式化的相关命令Partprobe
- 2008-07-28 自我调整检查点的参数约束
- 2006-07-28 Windows Xp重新安装备忘
- 2005-07-28 瑞典游记-预告篇
- 2005-07-28 在Solaris下安装VNC 远程安装Oracle
我今天也遇到了,那个PATCH文件太老了,我手工对比CVS中的MAGPIE rss做了一些修改。
想不到还有人遇到啊,你的门户也算久经考验了:)