Drupal7 刚刚发现一个BUG

Events happening in the community are now at Drupal community events on www.drupal.org.
GloolsGuan's picture

Drupal7 刚刚发现一个BUG, includes/form.inc 1579行 “if (isset($sections)) {” 这里是PHP常见错误,在该语句中, $sections总是存在的,即使为空数组,正确的判断应该是 “if (!empty($sections)) {”. 该问题会出现在个人定制表单,并通过AJAX进行字段判断时,无法正确输出错误信息。

Comments

It's better confirm your bug in IRC before posting out

xps's picture

这好像不是"BUG", $sections在之前未赋值的情况下为NULL, isset(NULL) === FALSE

Drupal made me crazy, the sick kind.

这个地方我也认为不需要修改。 @Glools

ycshen's picture

这个地方我也认为不需要修改。

@Glools 可以说一下什么情况下会发生bug吗?
或许我的确有考虑不周的情况。

技术细节应该发到drupal.org

zterry95's picture

如果确认是bug,可以到下面的链接汇报问题:
http://drupal.org/project/issues/drupal?status=All&categories=All
在components部分,选择 forms component。

在那里,会有drupal的核心维护者审核这个问题,这样应该是更好的方式。

中国 - China

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week