Issue Bug Closed

#45073ClassLoader cache parsing error with comments

Arne-Kolja Bachstein 02/01/13, 14:58 updated 08/19/13, 14:38

Description

This one occured for me using YAG (Yet Another Gallery), but rather seems to be a core bug.

In YAG the class PidDetector gets cached and the cached file is put in /typo3temp/Cache/Code/cache_store/ClassLoader_PidDetector_[…].php. But afterwards TYPO3 won’t run any more, because there is a parsing error in the resulting file. The parsing error is related to erroneously stripped line endings in a few lines that have a // comment:

Original file:

$pagesRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
    'uid', //$select_fields,
    'pages', //$from_table,
    'module="yag"' //$where_clause,
);

Cached file:

$pagesRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
      'uid', //$select_fields, 'pages', //$from_table, 'module="yag"' //$where_clause, );

When removing the comments in the original file, the cached one works … but still line endings get stripped like they maybe shouldn’t.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.