Fix bug in parsing vCard data using PHP 7.3 due to an invalid regexp (#6744)

Looks like \R is not allowed in character class, but \r\n is fine.
On PHP 7.3.5 it throws warnings and empty result from preg_replace(),
though I couldn't reproduce.
pull/6748/head
Aleksander Machniak 6 years ago
parent f3d16240f2
commit fe90903fa1

@ -35,6 +35,7 @@ CHANGELOG Roundcube Webmail
- Fix bug where attachment preview didn't work with x_frame_options=deny (#6688) - Fix bug where attachment preview didn't work with x_frame_options=deny (#6688)
- Fix so bin/install-jsdeps.sh returns error code on error (#6704) - Fix so bin/install-jsdeps.sh returns error code on error (#6704)
- Fix bug where bmp images couldn't be displayed on some systems (#6728) - Fix bug where bmp images couldn't be displayed on some systems (#6728)
- Fix bug in parsing vCard data using PHP 7.3 due to an invalid regexp (#6744)
RELEASE 1.4-rc1 RELEASE 1.4-rc1
--------------- ---------------

@ -539,7 +539,7 @@ class rcube_vcard
'/^item\d*\.X-AB.*$/mi', // remove cruft like item1.X-AB* '/^item\d*\.X-AB.*$/mi', // remove cruft like item1.X-AB*
'/^item\d*\./mi', // remove item1.ADR instead of ADR '/^item\d*\./mi', // remove item1.ADR instead of ADR
'/\n+/', // remove empty lines '/\n+/', // remove empty lines
'/^(N:[^;\R]*)$/m', // if N doesn't have any semicolons, add some '/^(N:[^;\r\n]*)$/m', // if N doesn't have any semicolons, add some
), ),
array( array(
'\2;type=\5\3:\4', '\2;type=\5\3:\4',

Loading…
Cancel
Save