MDL-34182: Add functions to warn of output in AJAX scripts
commit207f2c8880705d69e6ab2f8b82630a67b75856c4
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 13 Dec 2013 02:53:26 +0000 (13 10:53 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 13 Dec 2013 06:15:09 +0000 (13 14:15 +0800)
tree5609b943feac94f50d4611ee28c128a6c5753739
parent8703e6530c3db2c372765729eefd413ab2a6dab6
MDL-34182: Add functions to warn of output in AJAX scripts

We need to be able to capture output when including contributed code as it
may add additional content which makes makes the json we output invalid.

We only warn of these errors if the site is in debugdeveloper, otherwise
we silently drop them.
lib/ajax/ajaxlib.php
lib/tests/ajaxlib_test.php [new file with mode: 0644]