PHP4 Compatibility issue
teknocat - July 20, 2009 - 18:04
| Project: | Simplenews Template |
| Version: | 5.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | teknocat |
| Status: | needs review |
Jump to:
Description
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.
| Attachment | Size |
|---|---|
| simplenews_template_php4_fix.diff | 797 bytes |

#1
This relates to the following issue: #490502: Parse Error: simplenews_template/simplenews_template.inc on line 79
#2