mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-51603 dataformats: coding_exception if output buffering
This commit is contained in:
parent
5b95105600
commit
9df4ae4189
4 changed files with 5 additions and 10 deletions
|
@ -38,8 +38,8 @@
|
|||
*/
|
||||
function download_as_dataformat($filename, $dataformat, $columns, $iterator, $callback = null) {
|
||||
|
||||
if (!NO_OUTPUT_BUFFERING) {
|
||||
throw new coding_exception("NO_OUTPUT_BUFFERING must be set to true before calling download_as_dataformat");
|
||||
if (ob_get_length()) {
|
||||
throw new coding_exception("Output can not be buffered before calling download_as_dataformat");
|
||||
}
|
||||
|
||||
$classname = 'dataformat_' . $dataformat . '\writer';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue