Changeset View
Changeset View
Standalone View
Standalone View
scripts/__init_script__.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | if (!ini_get('date.timezone')) { | ||||
// timezone information (like "PST" or "-0700") which makes the | // timezone information (like "PST" or "-0700") which makes the | ||||
// environmental timezone setting is completely irrelevant. We never rely on | // environmental timezone setting is completely irrelevant. We never rely on | ||||
// the system timezone setting in any capacity, so prevent PHP from flipping | // the system timezone setting in any capacity, so prevent PHP from flipping | ||||
// out by setting it to a safe default (UTC) if it isn't set to some other | // out by setting it to a safe default (UTC) if it isn't set to some other | ||||
// value. | // value. | ||||
date_default_timezone_set('UTC'); | date_default_timezone_set('UTC'); | ||||
} | } | ||||
// Disable the insanely dangerous XML entity loader by default. | |||||
if (function_exists('libxml_disable_entity_loader')) { | |||||
libxml_disable_entity_loader(true); | |||||
} | |||||
// Now, load libphutil. | // Now, load libphutil. | ||||
$root = dirname(dirname(__FILE__)); | $root = dirname(dirname(__FILE__)); | ||||
require_once $root.'/src/__phutil_library_init__.php'; | require_once $root.'/src/__phutil_library_init__.php'; | ||||
PhutilErrorHandler::initialize(); | PhutilErrorHandler::initialize(); | ||||
// If possible, install a signal handler for SIGHUP which prints the current | // If possible, install a signal handler for SIGHUP which prints the current | ||||
Show All 17 Lines |