[Typo3-dev] annoying difference between 3.5 and 3.6 extmng class extension warnings

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Thu Mar 18 12:01:29 CET 2004


Martin T. Kutschker wrote:

> Hi!
>
> For 3.5 I used to write the class extension code like this (with 
> double quotes)
>
> if (defined("TYPO3_MODE") && 
> $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/gsi_whoisonline/pi1/class.tx_gsiwhoisonline_pi1.php"]) 
> {
>
> include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/gsi_whoisonline/pi1/class.tx_gsiwhoisonline_pi1.php"]);
> }
>
> I had to, because otherwise I'd get warnings.
>
> Now in 3.6RC1 I have to use single quotes. That's great, but now I 
> have warnings for my old code. Perhaps both could be supported in 3.6 
> final? 

File: typo3/mod/tools/em/index.php
Line 2431:

Change from

$XclassParts = explode('if (defined(\'TYPO3_MODE\') && $TYPO3_CONF_VARS[TYPO3_MODE][\'XCLASS\']',$fContent,2);
if (count($XclassParts)==2)     {

to

if (ereg("\n\w*if *\( *defined\(['\"]TYPO3_MODE['\"]\) *&& *[$]TYPO3_CONF_VARS\[TYPO3_MODE\]\[['\"]XCLASS['\"]\]([^}]*)}",$fContent,$XclassParts))      {

Masi





More information about the TYPO3-dev mailing list