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

Steffen Kamper steffen at sk-typo3.de
Mon Feb 18 10:01:30 CET 2008


"Ernesto Baschny [cron IT]" <ernst at cron-it.de> schrieb im Newsbeitrag 
news:mailman.1.1203324869.22247.typo3-team-core at lists.netfielders.de...
> 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
>

Hi Ernesto,

ries was wrong because this are no content files - it's only ext_tables and 
localconf, so there can't be a text with <?php or ?>.
Sure the added were stripped too but i wrapped the whole.

I did tests and all were correct.

vg Steffen 




More information about the TYPO3-team-core mailing list