stronk7

Untitled

May 7th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php
  2. index 844cc74ba94..326d21837ee 100644
  3. --- a/lib/phpunit/classes/util.php
  4. +++ b/lib/phpunit/classes/util.php
  5. @@ -327,6 +327,8 @@ class phpunit_util extends testing_util {
  6. public static function bootstrap_init() {
  7. global $CFG, $SITE, $DB, $FULLME;
  8.  
  9. + print_object ('BOOTSTRAP');
  10. +
  11. // backup the globals
  12. self::$globals['_SERVER'] = $_SERVER;
  13. self::$globals['CFG'] = clone($CFG);
  14. @@ -363,6 +365,13 @@ class phpunit_util extends testing_util {
  15. if (isset(self::$globals[$name])) {
  16. if (is_object(self::$globals[$name])) {
  17. $return = clone(self::$globals[$name]);
  18. + //$return = unserialize(serialize(self::$globals[$name]));
  19. + if ($name == 'SITE') {
  20. + if ($return->id != 1) {
  21. + print_object('SITE->id changed to ' . $return->id);
  22. + print_object($return);
  23. + }
  24. + }
  25. return $return;
  26. } else {
  27. return self::$globals[$name];
Advertisement
Add Comment
Please, Sign In to add comment