Project

General

Profile

Actions

Bug #71127

closed

Extending Class via $GLOBALS['TYPO3_CONF_VARS']['EXT'] throws 500 server error because of linebreak after class name

Added by Klaus Fiedler over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-10-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
extending classes,extbase,news
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hi,

i'm extending a extension via proxy class as described in corresponding manual (see [[https://docs.typo3.org/typo3cms/extensions/news/DeveloperManual/ExtendNews/ProxyClassGenerator/Index.html]]) via localconf.php of my own extension:


$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['classes']['Domain/Model/News'][] = my_extkey';

When my extending class looks like this, everything is fine:


class News extends \GeorgRinger\News\Domain\Model\News {
// Some code
}

But when the starting curly brace is in the next line as defined in PSR-2 coding standard, the server throws an error if i open the a page which accesses the extended class:

@
class News extends \GeorgRinger\News\Domain\Model\News {
// Some code
}
@

The error message says "syntax error, unexpected '{', expecting function in /typo3temp/Cache/Code/news/tx_news_domain_model_news.php". The reason is, that the last, closing curly brace of the class is missing (see screenshot).


Files

1.JPG (43.4 KB) 1.JPG Klaus Fiedler, 2015-10-29 13:54
Actions #1

Updated by Mathias Schreiber over 8 years ago

  • Status changed from New to Closed

Please report this to the extension author.
This is the core tracker of TYPO3.

Cheers
Mathias

Actions

Also available in: Atom PDF