Bug #64627

Extension installer: Handle multiple blanks

Added by Daniel Ostmann almost 6 years ago. Updated about 2 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

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

Actions
#1

Updated by Gerrit Code Review over 5 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

#2

Updated by Andreas Fernandez over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#3

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF