Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #!/usr/bin/env php
  2. <?php
  3. /**
  4. * Copyright © 2013-2017 Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7.  
  8. if (PHP_SAPI !== 'cli') {
  9. echo 'bin/magento must be run as a CLI application';
  10. exit(1);
  11. }
  12.  
  13. try {
  14. require __DIR__ . '/../app/bootstrap.php';
  15. } catch (\Exception $e) {
  16. echo 'Autoload error: ' . $e->getMessage();
  17. exit(1);
  18. }
  19. try {
  20. $handler = new \Magento\Framework\App\ErrorHandler();
  21. set_error_handler([$handler, 'handler']);
  22. $application = new Magento\Framework\Console\Cli('Magento CLI');
  23. $application->run();
  24. } catch (\Exception $e) {
  25. while ($e) {
  26. echo $e->getMessage();
  27. echo $e->getTraceAsString();
  28. echo "\n\n";
  29. $e = $e->getPrevious();
  30. }
  31. exit(Cli::RETURN_FAILURE);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement