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
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('&lt;span class=\&quot;newsletter-name\&quot;&gt;My-Newsletter: &lt;/span&gt;&lt;span class=\&quot;issue-title\&quot;&gt;Newsletter Title&lt;/span&gt;'). &quot; &quot; in /is/htdocs/wp1123905_WAUFW64VGM/patientenverfuegung/drupal5/sites/all/modules/drupal-contrib/simplenews/simplenews.module on line 1435

Looks 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

Sutharsan - January 2, 2010 - 17:13
Status:active» won't fix

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

spade - January 2, 2010 - 18:20

Thanks for the timely response ;-)

I think we can close this issue now.

Happy New Year and keep up the good work.

 
 

Drupal is a registered trademark of Dries Buytaert.