Example #1
0
File: index.php Project: saiber/www
        runApp($app);
    }
}
runApp($app);
if (!empty($_GET['stat'])) {
    $stat->display();
}
function dump_livecart_trace(Exception $e)
{
    echo "<br/><strong>" . get_class($e) . " ERROR:</strong> " . $e->getMessage() . "\n\n";
    echo "<br /><strong>FILE TRACE:</strong><br />\n\n";
    echo ApplicationException::getFileTrace($e->getTrace());
    exit;
}
if (!isset($classLoaderCache) || ClassLoader::isCacheChanged()) {
    $classLoaderCache = array('realPath' => ClassLoader::getRealPathCache(), 'mountPoint' => ClassLoader::getMountPointCache());
    file_put_contents($classLoaderCacheFile, '<?php return ' . var_export($classLoaderCache, true) . '; ?>');
}
session_write_close();
function remove_recursion(&$object, &$stack = array())
{
    if ((is_object($object) || is_array($object)) && $object) {
        if (!in_array($object, $stack, true)) {
            $stack[] = $object;
            foreach ($object as &$subobject) {
                remove_recursion($subobject, $stack);
            }
        } else {
            $object = "***RECURSION***";
        }
    }