mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +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
|
@ -1704,10 +1704,8 @@ class table_dataformat_export_format extends table_default_export_format_parent
|
|||
public function __construct(&$table, $dataformat) {
|
||||
parent::__construct($table);
|
||||
|
||||
if (!NO_OUTPUT_BUFFERING) {
|
||||
// Ideally this would throw a coding exception but we are more forgiving here due
|
||||
// to the large amount of code already using table_sql.
|
||||
debugging("NO_OUTPUT_BUFFERING should be set to true before downloading", DEBUG_DEVELOPER);
|
||||
if (ob_get_length()) {
|
||||
throw new coding_exception("Output can not be buffered before instantiating table_dataformat_export_format");
|
||||
}
|
||||
|
||||
$classname = 'dataformat_' . $dataformat . '\writer';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue