|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-01-17 12:16 UTC] stenschke at gyselroth dot com
Description:
------------
Following code causes PHP error: "Segmentation fault (core dumped)"
utf8_decode('<w:fldSimple w:instr=" MERGEFIELD Üüü \* MERGEFORMAT "><w:r><w:t xml:space="preserve">«Üüü»</w:t></w:r></w:fldSimple>');
preg_match('/<w:fldSimple w:instr="\s*MERGEFIELD\s*([a-zäöü|\d|_|\.]*)\s*\\\*\s*/u', $xml, $matches);
P.s. Exact used PHP version (not in bugtracker's options) is: PHP 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Oct 27 2017 13:49:56)
Actual result:
--------------
Array()
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
I made a copy/paste error, correct code is: $xml = utf8_decode('<w:fldSimple w:instr=" MERGEFIELD Üüü \* MERGEFORMAT "><w:r><w:t xml:space="preserve">«Üüü»</w:t></w:r></w:fldSimple>'); preg_match('/<w:fldSimple w:instr="\s*MERGEFIELD\s*([a-zäöü|\d|_|\.]*)\s*\\\*\s*/u', $xml, $matches);