Project

General

Profile

Actions

Bug #64627

closed

Extension installer: Handle multiple blanks

Added by Daniel Ostmann almost 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2015-01-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #62245: Extension installer: Handle multiple blanksClosed2014-10-15

Actions
Actions

Also available in: Atom PDF