View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
08541Bug reportsExpression Managerpublic2014-01-16 16:45
Reporterduvemyster Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.05+ 
Summary08541: str_replace seems to be replacing just the first occurrence of search string rather than all occurrences
Description

string str_replace(search, replace, subject) seems to only be replacing the first occurrence of the search string.

http://manual.limesurvey.org/Expression_Manager#Implemented_Functions currently states this function will "Replace all occurrences of the search string with the replacement string"

Steps To Reproduce

Utilize EM to reference an answer that has more than one occurrence of the replacement string. Example:

TEST = 222,222,222

{str_replace(",", "", TEST)

This is resulting in 222222,222 rather than 222222222.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)Build 131206
I will donate to the project if issue is resolvedNo
BrowserFirefox 26.0
Database type & versionMySQL 5.1
Server OS (if known)Linux
Webserver software & version (if known)Apache/2.2
PHP Version5.4.10

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-01-14 21:19

administrator   ~27867

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

c_schmitz

c_schmitz

2014-01-16 16:45

administrator   ~27912

2.05+ Build 140116 released

Related Changesets

LimeSurvey: master b8ad8cb8

2014-01-14 20:18:43

c_schmitz

Details Diff
Fixed issue 08541: str_replace seems to be replacing just the first occurrence of search string rather than all occurrences Affected Issues
08541
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2014-01-14 20:31 duvemyster New Issue
2014-01-14 21:17 c_schmitz Assigned To => c_schmitz
2014-01-14 21:17 c_schmitz Status new => assigned
2014-01-14 21:19 c_schmitz Changeset attached => LimeSurvey master b8ad8cb8
2014-01-14 21:19 c_schmitz Note Added: 27867
2014-01-14 21:19 c_schmitz Resolution open => fixed
2014-01-14 21:22 c_schmitz Status assigned => resolved
2014-01-14 21:22 c_schmitz Fixed in Version => 2.05+
2014-01-16 16:45 c_schmitz Note Added: 27912
2014-01-16 16:45 c_schmitz Status resolved => closed