Drupal PHP5.3 Issue: Attempt to modify property of non-object (Date module)

用VPS后,安装的PHP版本是最新的5.3版,Drupal Date模块会出现下面的warning信息:

warning: Attempt to modify property of non-object in ../sites/all/modules/date/includes/date_plugin_display_attachment.inc on line 24.

可以用下面的方法进行解决:

用VPS后,安装的PHP版本是最新的5.3版,Drupal Date模块会出现下面的warning信息:

warning: Attempt to modify property of non-object in ../sites/all/modules/date/includes/date_plugin_display_attachment.inc on line 24.

可以用下面的方法进行解决:

参考资料:

  • http://drupal.org/node/549884 comment #62
  • 补充一点就是 #62 里面的 canlendar_nav 要改为 date_nav
  • $display->display_options['style_plugin'] = 'calendar_nav';
    -->
    $display->display_options['style_plugin'] = 'date_nav';

Leave a Reply

Your email address will not be published. Required fields are marked *