Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I discovered a line of code in simplenews_template.inc that only works in PHP5. It was line 79 where it gets the newsletter name from taxonomy. It tries to use an object operator directly on the return value of the taxonomy_get_term function which only works in PHP5 (taxonomy_get_term($tid)->name). The solution for PHP 4 is to break it into a couple of lines, first putting the object returned by the taxonomy_get_term object into a variable then calling the object's "name" property on that variable. The attached patch file contains this fix.
Comment | File | Size | Author |
---|---|---|---|
simplenews_template_php4_fix.diff | 797 bytes | teknocat |
Comments
Comment #1
teknocat CreditAttribution: teknocat commentedThis relates to the following issue: #490502: Parse Error: simplenews_template/simplenews_template.inc on line 79
Comment #2
leeomara