17732.patch

Administrator Admin, 2011-02-24 09:15

Download (1.18 KB)

View differences:

typo3/sysext/install/mod/class.tx_install_session.php (revision )
380 380
		return TRUE;
381 381
	}
382 382

  
383
	/**
384
	 * Writes the session data at the end, to overcome a PHP APC bug.
385
	 *
386
	 * Writes the session data in a proper context that is not affected by the APC bug:
387
	 * http://pecl.php.net/bugs/bug.php?id=16721.
388
	 *
389
	 * This behaviour was introduced in #17511, where self::write() made use of t3lib_div
390
	 * which due to the APC bug throws a "Fatal error: Class 't3lib_div' not found"
391
	 * (and the session data is not saved). Calling session_write_close() at this point
392
	 * seems to be the most easy solution, acording to PHP author.
393
	 *
394
	 * @return void
395
	 */
396
	public function __destruct() {
397
		session_write_close();
383
}
398
	}
399
}
384 400

  
385 401
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install_session.php'])) {
386 402
	include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install_session.php']);