Bug #16068
closedOut of Memory Problem in the Extension Manager: version_compare() to blame
0%
Description
I have the PRoblem that the original Extension Manager failed with Out of Memory Problem PHP Message. Allocation failed. He also try to allocate few gigs of Ram and it not help. If found also that the implode function was not used correct by this class twice. I fixed the code with the knowledge i have about this class and describle the code changes as follow.
The follow code are alredy changed code. It is not the original code! This changed solved both Problems on my side.
File: typo3/mod/tools/em/class.em_index.php
Line 1394:
/* * Implode Parameter was wrong * */
$mirrors = implode(chr(10), gzfile($mfile));
t3lib_div::unlink_tempfile($mfile);
Line: 1425
/* * Implode Parameter was wrong * */
$mirrors = implode(chr(10), gzfile($mfile));
t3lib_div::unlink_tempfile($mfile);
Line: 2976:
/* * OUT OF MEMORY BUG START HERE */
if(strlen($emConf['PHP_version'])) {
$versionRange = $this->splitVersionRange($emConf['PHP_version']);
//if(version_compare($versionRange0,'3.0.0','<')) $versionRange0 = '3.0.0';
//if(version_compare($versionRange1,'3.0.0','<')) $versionRange1 = '';
$emConf['constraints']['depends']['php'] = implode('-',$versionRange);
}
if(strlen($emConf['TYPO3_version'])) {
$versionRange = $this->splitVersionRange($emConf['TYPO3_version']);
//if(version_compare($versionRange0,'3.5.0','<')) $versionRange0 = '3.5.0';
//if(version_compare($versionRange1,'3.5.0','<')) $versionRange1 = '';
$emConf['constraints']['depends']['typo3'] = implode('-',$versionRange);
}
/ * OUT OF MEMORY BUG STOP HERE * */
(issue imported from #M3302)