Bug #45073
closedClassLoader cache parsing error with comments
0%
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.
Files
Updated by Arne-Kolja Bachstein almost 12 years ago
The parse errors are not only comment related and it's not only these line endings. I stumbled upon another one that seems to be related to that.
This time it is:
Before caching:
public function setFeUser(Tx_Extbase_Domain_Model_FrontendUser $feUser) { $this->feUser = $feUser; }
After caching:
public function setFeUser(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser $feUser) { $this->feUser = $feUser; }
Again, of course this breaks the corresponding functionality completely, throwing an exception like this:
PHP Fatal error: Declaration of Tx_Yag_Domain_Import_AbstractImporter::setFeUser() must be compatible with that of Tx_Yag_Domain_Import_ImporterInterface::setFeUser() in [path_to]/typo3temp/Cache/Code/cache_core/ClassLoader_AbstractImporter_[hash].php on line 35
Updated by Christian Kuhn almost 12 years ago
- Status changed from New to Needs Feedback
You are using TYPO3 6.0 on php versions smaller than 5.3.7, right?
Updated by Arne-Kolja Bachstein almost 12 years ago
TYPO3 6.0.1 and PHP 5.3.3-7+squeeze14 here, you're right.
Just noticed that the PHP version is below the requirements … sorry, didn't know that. Is there a way to work around this or is it a hard requirement?
Updated by Christian Kuhn almost 12 years ago
could you please add the original class file to this issue here, please?
Updated by Gerald Amrhein over 11 years ago
- File phpinfo.pdf phpinfo.pdf added
Hello,
i got a similar warning in "Galerie - YAG Storage Folder"
PHP Warning: Creating default object from empty value in /var/www/amrhein.info/http/www3/typo3conf/ext/yag/Classes/Utility/HeaderInclusion.php line 190
System:
Typo3 6.0.2
Apache 2
PHP Version 5.4.14-1~lucid+1
Ubuntu 10.04 LTS hosted by "Host Europe" vServer L (small Power)
attached you find a phpinfo print
is there a solution available?
What is the couse of this warning?
Kind regards, Gerald
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to Closed
@Gerald Amrhein
That's not the same issue, please open a new issue, if the problem persists with newer versions of TYPO3
@Arne-Kolja Bachstein
As there is no response in over 90 days, I'll closing this issue.