Drupal investigation

update.php 848B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * The PHP page that handles updating the Drupal installation.
  5. *
  6. * All Drupal code is released under the GNU General Public License.
  7. * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
  8. */
  9. use Drupal\Core\Update\UpdateKernel;
  10. use Symfony\Component\HttpFoundation\Request;
  11. $autoloader = require_once 'autoload.php';
  12. // Disable garbage collection during test runs. Under certain circumstances the
  13. // update path will create so many objects that garbage collection causes
  14. // segmentation faults.
  15. require_once 'core/includes/bootstrap.inc';
  16. if (drupal_valid_test_ua()) {
  17. gc_collect_cycles();
  18. gc_disable();
  19. }
  20. $kernel = new UpdateKernel('prod', $autoloader, FALSE);
  21. $request = Request::createFromGlobals();
  22. $response = $kernel->handle($request);
  23. $response->send();
  24. $kernel->terminate($request, $response);