[TYPO3-core] RFC: Bugfix #7425: syntax error in temp_CACHE*.php

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Feb 18 09:54:28 CET 2008


Steffen Kamper wrote: on 06.02.2008 21:20:

> Branches: Trunk only
> 
> BT reference: http://bugs.typo3.org/view.php?id=7425
> 
> Type: Bugfix
> 
> Problem:
> 
> if extensions ext_localconf.php or ext_tables.php misses php endtag, there 
> is a syntax error in temp_CACHE*.php because they are merged together, and 
> then such a construct leads to the syntax error:
> 
> <?php
> ....
> <?php
> 
> Solution:
> 
> strip out php-tags and wrap with single php-tag

+1 to the idea, but the preg expression is wrong. As ries already 
pointed out, any "?>" or "<?php" in the ext*.php will be stripped out, 
which might not be desired. Only leading and ending tags should be 
stripped. And as we also add some "<?php" and "?>" in extMgm itself, 
those have to be stripped too (or better not even added).

Attached patch does that.

Cheers,
Ernesto

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7425-tempcache-phptags.diff
Type: text/x-diff
Size: 2268 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080218/4a8bf8c4/attachment.diff 


More information about the TYPO3-team-core mailing list