Bug #64627
closedExtension installer: Handle multiple blanks
100%
Description
In issue #62245 a better solution to remove blanks is provided. This solution is great indeed but needs a "newer" PCRE extension. I don't know which version at least is needed. If the PCRE extension does not provide the horizontal whitespace sequence the install tool would simply remove the "h" letters!
The statement
ALTER TABLE some_table ADD chash some_definition
would then become
ALTER TABLE some_table ADD c as some_definition
Note the missing "h"!
I solved it by changing this line in file /typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php (around line 109)
$lineV = preg_replace('/\h+/', ' ', $lineV);
to
$lineV = preg_replace('/[ \t]+/', ' ', $lineV);
Found in PCRE man page: http://www.pcre.org/pcre.txt
The sequences \h, \H, \v, and \V are features that were added to Perl at release 5.10. In contrast to the other sequences, which match only ASCII characters by default, these always match certain high-valued code points, whether or not PCRE_UCP is set. The horizontal space char- acters are:
I'm not sure if I should patch it or not. I think the solution in #62245 is well. But the minimum requirements for TYPO3 6.2 should give a hint to PCRE version 5.10.
PS: I had this behaviour two times.
Updated by Gerrit Code Review over 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38374
Updated by Andreas Kienast over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset af441411ce727fe069564f7b93e26e1943fdc39c.