From 3e4e6eda3c58d56b270c9027fb3a36820c1e527e Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 17 Dec 2009 22:52:37 +0000 Subject: [PATCH] MDL-20797 removing problematic __desctruct() magic from the xhtml_container_stack, ->footer() handles it already --- lib/outputlib.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index 7c712474a3..ab91fc8d9a 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -1115,30 +1115,6 @@ class xhtml_container_stack { $this->opencontainers = null; } - /** - * Emergency fallback. If we get to the end of processing and not all - * containers have been closed, output the rest with a developer debug warning. - * @return void - */ - public function __destruct() { - if (empty($this->opencontainers)) { - return; - } - - // TODO: MDL-20625 this looks dangerous and problematic because we never know - // the order of calling of constructors ==> the transaction warning will not be included - - // It seems you cannot rely on $CFG, and hence the debugging function here, - // becuase $CFG may be destroyed before this object is. - if ($this->isdebugging) { - echo '

Some containers were left open. This suggests there is a nesting problem.

' . - $this->output_log() . '
'; - } - echo $this->pop_all_but_last(); - $container = array_pop($this->opencontainers); - echo $container->closehtml; - } - /** * Adds an entry to the log. * @param string $action The name of the action -- 2.39.5