Fatal error: preg_replace
spade - April 17, 2009 - 09:37
| Project: | Simplenews |
| Version: | 5.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
When I try to send an text-only newsletter (testwise), I get the following error:
Parse error: syntax error, unexpected '.' in /is/htdocs/wp1123905_WAUFW64VGM/patientenverfuegung/drupal5/sites/all/modules/drupal-contrib/simplenews/simplenews.module(1435) : regexp code on line 1
Fatal error: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Failed evaluating code: .strtoupper('<span class=\"newsletter-name\">My-Newsletter: </span><span class=\"issue-title\">Newsletter Title</span>'). " " in /is/htdocs/wp1123905_WAUFW64VGM/patientenverfuegung/drupal5/sites/all/modules/drupal-contrib/simplenews/simplenews.module on line 1435Looks like strtoupper can't swallow the header from simplenews_template (5.x-1.4). Since this error is pointing to the html-to-text conversion in simplenews, I am reporting this issue here.
I can recreate this issue with new newsletters.
Hope this helps.
Kind regards,
Frank

#1
I can not reproduce this error. strtoupper accepts all characters. Try changing your HTML to
<h1>Only the title here, no spans</h1>Optionally replace strtoupper() with drupal_strtoupper(). If the latter solves your problem, let me know and I'll make a change in the module.#2
Thanks for the timely response ;-)
I think we can close this issue now.
Happy New Year and keep up the good work.