View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
19990Bug reportsOtherpublic2026-11-18 15:36
Reportertibor.pacalat Assigned Toc_schmitz  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version6.6.x 
Summary19990: "Allowed memory size exhausted" error when processing an email body with a long, complex script
Description

The preg_split function in em_core_helper.php::asSplitStringOnExpressions() fails to complete, resulting in an "Allowed memory size exhausted" error when processing an email body with a long, complex script.

Steps To Reproduce

Steps to reproduce

  1. Open any survey.
  2. Navigate to Email Templates.
  3. Copy the attached script into any email template.
  4. Click Validate ExpressionScript.

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)6.10.6+250224
I will donate to the project if issue is resolvedNo
Browser
Database type & version.
Server OS (if known)
Webserver software & version (if known)
PHP Version.
Git branch / Pull Request URLN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2025-03-03 15:45

developer   ~82177

What is the expected result ?
I don't know what to do here.

tibor.pacalat

tibor.pacalat

2025-03-03 16:08

administrator   ~82180

@DenisChenu not to get an error and successfully validate ExpressionScript.

DenisChenu

DenisChenu

2025-03-03 16:21

developer   ~82182

But ; we can not at all time.
Maybe I can improve memory usage, but clearly not in all condition !

DenisChenu

DenisChenu

2025-09-24 16:48

developer   ~83473

Possible to have the survey ?

I have some pdfrport big size file, but no issue

tibor.pacalat

tibor.pacalat

2025-09-24 17:05

administrator   ~83474

You mean survey that was used along side this email template? I probably don't have it any more.

DenisChenu

DenisChenu

2025-09-25 11:57

developer   ~83482

You mean survey that was used along side this email template? I probably don't have it any more.

I have some idea but a complex survey can help.

I try some new survey

c_schmitz

c_schmitz

2026-10-12 11:46

administrator   ~86333

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=40790

c_schmitz

c_schmitz

2026-10-12 11:47

administrator   ~86334

Last edited: 2026-10-12 11:49

An apostrophe between two letters inside an answer option ended a single-quoted string in the expression splitter and tokenizer, causing it to gulp down the rest of the equation as one big string, evaluating it repeatedly in following loops. Crazy.

LimeBot

LimeBot

2026-10-13 11:49

administrator   ~86372

Fixed in Release 7.6.0+261013

Related Changesets

LimeSurvey: master f25d93a7

2026-10-12 11:45

c_schmitz


Details Diff
Fixed issue 19990: An apostrophe inside quoted text in an expression (e.g. 'Crohn's disease') broke all following expressions and could exhaust memory
Dev An apostrophe between two letters no longer ends a single-quoted string in the expression splitter and tokenizer
Affected Issues
19990
mod - application/helpers/expressions/em_core_helper.php Diff File
mod - tests/unit/ExpressionManagerTest.php Diff File

Issue History

Date Modified Username Field Change
2025-03-03 15:44 tibor.pacalat New Issue
2025-03-03 15:44 tibor.pacalat File Added: Detailed_admin_notification.txt
2025-03-03 15:44 tibor.pacalat Assigned To => DenisChenu
2025-03-03 15:44 tibor.pacalat Status new => assigned
2025-03-03 15:45 DenisChenu Note Added: 82177
2025-03-03 15:45 DenisChenu Bug heat 6 => 8
2025-03-03 16:08 tibor.pacalat Note Added: 82180
2025-03-03 16:08 tibor.pacalat Bug heat 8 => 10
2025-03-03 16:21 DenisChenu Note Added: 82182
2025-09-24 16:48 DenisChenu Note Added: 83473
2025-09-24 17:05 tibor.pacalat Note Added: 83474
2025-09-25 11:57 DenisChenu Note Added: 83482
2026-10-12 11:46 c_schmitz Changeset attached => LimeSurvey master f25d93a7
2026-10-12 11:46 c_schmitz Note Added: 86333
2026-10-12 11:46 c_schmitz Assigned To DenisChenu => c_schmitz
2026-10-12 11:46 c_schmitz Status assigned => resolved
2026-10-12 11:46 c_schmitz Resolution open => fixed
2026-10-12 11:46 c_schmitz Bug heat 10 => 12
2026-10-12 11:47 c_schmitz Note Added: 86334
2026-10-12 11:49 c_schmitz Note Edited: 86334
2026-10-13 11:49 LimeBot Note Added: 86372
2026-10-13 11:49 LimeBot Status resolved => closed
2026-10-13 11:49 LimeBot Bug heat 12 => 14
2026-11-18 15:35 c_schmitz File Deleted: Detailed_admin_notification.txt
2026-11-18 15:36 c_schmitz View Status private => public
2026-11-18 15:36 c_schmitz Bug heat 14 => 8