Browse Source

Merge pull request #32435 from nextcloud/revert-32278-remove-default-php

Revert "Remove call to already default php.ini values"
pull/32537/head
Joas Schilling 3 years ago
committed by GitHub
parent
commit
8e59d49701
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      lib/base.php

11
lib/base.php

@ -143,7 +143,7 @@ class OC {
public static function initPaths() {
if (defined('PHPUNIT_CONFIG_DIR')) {
self::$configDir = OC::$SERVERROOT . '/' . PHPUNIT_CONFIG_DIR . '/';
} elseif (defined('PHPUNIT_RUN') && PHPUNIT_RUN && is_dir(OC::$SERVERROOT . '/tests/config/')) {
} elseif (defined('PHPUNIT_RUN') and PHPUNIT_RUN and is_dir(OC::$SERVERROOT . '/tests/config/')) {
self::$configDir = OC::$SERVERROOT . '/tests/config/';
} elseif ($dir = getenv('NEXTCLOUD_CONFIG_DIR')) {
self::$configDir = rtrim($dir, '/') . '/';
@ -464,6 +464,14 @@ class OC {
return \OC::$server->getConfig()->getSystemValue('session_lifetime', 60 * 60 * 24);
}
/**
* Try to set some values to the required Nextcloud default
*/
public static function setRequiredIniValues() {
@ini_set('default_charset', 'UTF-8');
@ini_set('gd.jpeg_ignore_warning', '1');
}
/**
* Send the same site cookies
*/
@ -630,6 +638,7 @@ class OC {
@set_time_limit(max(intval(@ini_get('max_execution_time')), intval(@ini_get('max_input_time'))));
}
self::setRequiredIniValues();
self::handleAuthHeaders();
$systemConfig = \OC::$server->get(\OC\SystemConfig::class);
self::registerAutoloaderCache($systemConfig);

Loading…
Cancel
Save