* Uncompresses and dearchives files from the input file. * * @package harmoni.utilities * * @copyright Copyright © 2005, Middlebury College * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) * * @version $Id: Dearchiver.class.php,v 1.8 2007/10/17 19:07:55 adamfranco Exp $ */ // PEAR Libraries raise some E_STRICT runtime notices. Ignore these since we can't // change them. $tmpReporting = error_reporting(); if ($tmpReporting & E_STRICT) { error_reporting(E_ALL & ~E_STRICT); } $handler = HarmoniErrorHandler::instance(); $tmpFatal = $handler->fatalErrors(); if ($tmpFatal & E_STRICT) { $handler->fatalErrors(E_ALL & ~E_STRICT); } // Use a custom version of Archive/Tar if requested. if (defined('ARCHIVE_TAR_PATH')) { require_once ARCHIVE_TAR_PATH; } else { require_once "Archive/Tar.php"; } if ($tmpReporting & E_STRICT) { error_reporting($tmpReporting); } if ($tmpFatal & E_STRICT) { $handler->fatalErrors($tmpFatal);
/** * Handle an error * * @param int $errorType * @param string $errorMessage * @return void * @access public * @since 10/10/07 * @static */ public static function handleError($errorType, $errorMessage) { // do a bitwise comparison of the error level to the current error_reporting level // and do not print or log if it doesn't match. if (!($errorType & error_reporting())) { // Check if the error level is fatal continue and if not. $handler = HarmoniErrorHandler::instance(); if (!($errorType & $handler->fatalErrors)) { return; } else { die; } } $backtrace = debug_backtrace(); // $backtrace = array_shift(debug_backtrace()); // Remove the message from the error-handler call from the backtrace $backtrace[0]['function'] = ''; $backtrace[0]['class'] = ''; $backtrace[0]['type'] = ''; $backtrace[0]['args'] = array(); $errorHandler = HarmoniErrorHandler::instance(); $errorHandler->completeHandlingError($errorType, $errorMessage, $backtrace); }