Issue Bug Closed

#85015stdWrap replacement: useRegExp = 0 should not use preg_replace()

Andreas Krämer 05/15/18, 15:50 updated 12/23/19, 22:48

Description

Hi,

if I write “useRegExp = 0” within a replacement rule it leads to the following error:
_PHP Warning: preg_replace(): Delimiter must not be alphanumeric or backslash_

I know it is not necessary to write the line at all but I think it should work anyway and should not accept 0 as “true”.

Example:

page.3 = TEXT
page.3 {
    value = There_are_a_cat,_a_dog_and_a_tiger_in_da_hood!_Yeah!
    stdWrap.replacement {
        10 {
            search = in da hood
            replace = around the block
            useRegExp = 0
        }
    }
}

Reviews 2

History 36

  1. Riccardo De Contardi changed category 05/27/18, 17:56

  2. Gerrit Code Review pushed patch set 1 for master to change 58945 status New Under Review 11/24/18, 19:52

  3. Gerrit Code Review pushed patch set 2 for master to change 58945 12/14/18, 11:12

  4. Gerrit Code Review pushed patch set 1 for 9.5 to change 62144 11/04/19, 17:21

  5. Wolfgang Klinger commented and changed status Under Review Resolved done 0 % 100 % 11/04/19, 17:30

    Applied in changeset commit:bef44dd55540c0a4741434007dd201126fcb972a.

  6. Benni Mack changed status Resolved Closed 12/23/19, 22:48